- Docker
- Amazon Web Services (AWS) account w S3 Bucket and IAM user with permissions to access the bucket with Cloudfront
- SMTP provider
- DeepL API Key (for translation features)
- Clone the repository
git clone git@gitlab.eeecs.qub.ac.uk:jackcooperdev/csc3002-lms.git- Create a
.envfile in the root directory of the project and add the following environment variables:
# App Config Defaults
APP_NAME=LMS
ALLOWED_DOMAINS=@example.com // Allowed Email Domains for Registration
ADMIN_ACCOUNTS=admin@example.com // Comma Separated List of Admin Accounts
REQUIRE_VERIFICATION=yes // Require Email Verification for Registration (yes/no)
NODE_ENV=production // Set to production for production environment, development for development environment
# SMTP Info
SMTP_HOST=HOST_ADDRESS
SMTP_PORT=587
SMTP_USER=USERNAME
SMTP_PASS=PASSWORD
SMTP_FROM=no-reply@lms.local
# General
PUBLIC_BASE_URL=http://localhost:8080
PUBLIC_FRONTEND_URL=http://localhost:4200
JWT_ACCESS_SECRET=RANDOM_SECRET_KEY_FOR_ACCESS_TOKENS
JWT_COURSE_ACCESS_SECRET=RANDOM_SECRET_KEY_FOR_ACCESS_TOKENS
JWT_REFRESH_SECRET=RANDOM_SECRET_KEY_FOR_ACCESS_TOKENS
SERVICE_JWT_SECRET=RANDOM_SECRET_KEY_FOR_ACCESS_TOKENS
DEEPL_API_KEY=DEEPL_API_KEY
# AWS Info
AWS_ACCESS_KEY=ACCESS_KEY_ID
AWS_ACCESS_SECRET=BASE64_ENCODED_PRIVATE_KEY
AWSS3_PRIVATE_KEY=PRIIVATE_KEY
AWS_REGION=eu-north-1
S3_BUCKET=S3_BUCKET_NAME
CLOUDFRONT_DOMAIN=CLOUDFRONT_DOMAIN_NAME
CLOUDFRONT_KEY_PAIR_ID=CLOUDFRONT_KEY_PAIR_IDfill in the values for the environment variables as per your setup.
- Build and run the application using Docker Compose
docker compose -f docker/docker-compose.yml up --build - Access the application at
http://localhost:4200 - Register a new account using an email address that matches the allowed domains specified in the
.envfile and is marked as a ADMIN_ACCOUNT. - Check your email for a verification link and click on it to verify your identity
To add instructors to the LMS, you can follow these steps:
- Log in to the LMS with an admin account.
- Navigate to the "Admin" section of the dashboard. (Click your user icon and press admin)
- Scroll to students and find the user you want to promote to instructor.
- Click the "Promote to Instructor" button next to the user's name.
- The user will now have instructor privileges and can create and manage courses.
- The opposite can be done to demote an instructor back to a student by clicking the "Demote to Student" button next to their name in the admin panel.
- Other settings such as allowed email domains and the requiring of email verification can also be managed in the admin panel.