This eLearning platform enables teachers to create courses, upload materials, manage students, and facilitate real-time communication. Students can enroll in courses, access materials, leave feedback, and engage in real-time chat. Notifications are sent when new materials are uploaded or when students enroll in courses.
eLearning_project/
┣ Backend/
┃ ┣ accounts/
┃ ┣ api/
┃ ┣ chat/
┃ ┣ core/
┃ ┣ courses/
┃ ┣ email_simulation/
┃ ┣ feedback/
┃ ┣ media/
┃ ┣ notifications/
┃ ┣ user_permissions/
┃ ┣ .env
┃ ┣ db.sqlite3
┃ ┣ manage.py
┃ ┣ pytest.ini
┃ ┗ requirements.txt
┣ Frontend/
┃ ┣ public/
┃ ┣ src/
┃ ┣ .browserslistrc
┃ ┣ .editorconfig
┃ ┣ .gitattributes
┃ ┣ .gitignore
┃ ┣ .prettierignore
┃ ┣ .prettierrc.js
┃ ┣ LICENSE
┃ ┣ eslint.config.mjs
┃ ┣ index.html
┃ ┣ package-lock.json
┃ ┣ package.json
┃ ┗ vite.config.mjs
┗ .gitignore
- Python 3.12
- Node.js (latest stable version)
-
Navigate to the
Backenddirectory:cd Backend -
Create and activate a virtual environment:
python -m venv venv python3 -m venv venv # MacOS source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Start WebSockets and background tasks:
daphne -b 127.0.0.1 -p 8000 core.asgi:application # WebSockets redis-server # Redis celery -A core worker --loglevel=info # Background tasks
-
To approve a new user, run Django's default development server:
python manage.py runserver 8080 # To access the admin panel and go to te admin panel: http://localhost:8080/admin/ -
Admin Credentials
email: admin@email.com password: admin123
- Navigate to the
Frontenddirectory:cd Frontend - Install dependencies:
npm install
- Start the development server:
npm start
The frontend should be accessible at http://127.0.0.1:3000
The admin panel at http://127.0.0.1:8080/admin/
The Daphne server at http://127.0.0.1:8000
email: testuser1@example.com
password: testuser1
email: testuser2@example.com
password: testuser2
email: teacher1@email.com
password: teacher1
email: student1@example.com
password: student1
email: samsmith@email.com
password: samsmith1
email: michaellynch@email.com
password: michaellynch
email: testuser3@example.com
password: testuser3
Important: Make sure Daphne, Celery and Redis are running before running the tests
Run the following command in the Backend directory:
pytestThis will execute all Django tests, including API, serializers, and WebSocket tests.
- API documentation: http://127.0.0.1:8000/api/docs/
- Static files are not loaded by Daphne, therefore, run Django's development server to access the admin panel to approve a new user
- The WebSocket, Redis and Celery processes must be running for real-time notifications and background tasks to function properly.
Giuseppe Babino
