CampLearn is an offline-first digital learning platform designed to provide high-quality education to children and youth in IDP (Internally Displaced Persons) camps and underserved communities. This repository contains the Django-based backend API.
- RBAC (Role-Based Access Control): Granular permissions for Students, Facilitators, Camp Admins, and System Admins.
- Learning Content Management: Comprehensive management of Courses and Lessons (Video, Audio, Text).
- Assessment Engine: Integrated Quiz system with automated grading.
- Progress Tracking: Real-time tracking of learner progress through courses and lessons.
- Gamification: Points, Badges, and Leaderboard system to drive engagement.
- Offline Sync: Architecture designed to synchronize offline activity logs from local learning hubs to the cloud.
- Impact Analytics: Advanced reporting on camp performance and learner engagement metrics.
- Auto-Generated Docs: Interactive API documentation via Swagger/OpenAPI.
- Framework: Django 4.2 LTS
- API Engine: Django REST Framework (DRF)
- Authentication: SimpleJWT
- Documentation: drf-spectacular (OpenAPI 3.0)
- Environment Management: Python Decouple
- Database: PostgreSQL (Production recommended), SQLite (Development default)
- Python 3.9+
- pip
- virtualenv
-
Clone the repository:
git clone <repository-url> cd CAMPLEARN
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
cp .env.example .env # Edit .env with your local settings (SECRET_KEY, DB settings, etc.) -
Run migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
Start the development server:
python manage.py runserverThe API will be available at http://127.0.0.1:8000/.
- Swagger UI: http://127.0.0.1:8000/api/docs/
- Django Admin: http://127.0.0.1:8000/admin/
The project includes an end-to-end integration test suite. Run tests using:
python manage.py test apps.core_integration_test -v 2CAMPLEARN/
├── apps/
│ ├── accounts/ # Authentication & User Profiles
│ ├── camps/ # Camp & Location Management
│ ├── courses/ # Learning Content & Lessons
│ ├── quizzes/ # Assessments & Grading
│ ├── progress/ # Learner Progress Tracking
│ ├── gamification/ # Points & Badges Engine
│ ├── devices/ # Sync & Device Management
│ └── analytics/ # Impact & Usage Reporting
├── config/ # Project Settings & Root URLs
└── utils/ # Shared helper functions
This project is licensed under the MIT License.