Afya Quest is a mobile-first web application designed to empower Community Health Assistants (CHAs) through gamified learning. The platform provides interactive lessons, video modules, daily questions, and location-based features to enhance the learning experience for healthcare workers in the field.
- Bilingual support (English & Swahili)
- Gamified curriculum with points and achievements
- Progressive difficulty levels
- Category-based lessons (Hygiene, Nutrition, Emergency Care, etc.)
- Content-based informational videos
- Quiz integration with video lessons
- Progress tracking for each module
- Offline capability for downloaded content
- Reinforcement learning through daily quizzes
- Multiple difficulty levels (Easy, Medium, Hard)
- Points-based reward system
- Streak tracking to encourage daily engagement
- Location-based navigation
- Nearby health facilities finder
- CHA network visualization
- Easy navigation for Kabale region
- React (v18.2.0) - UI framework
- TypeScript - Type safety
- React Router - Navigation
- Leaflet - Map integration
- Axios - API communication
- Node.js - Runtime environment
- Express - Web framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- Bcrypt - Password hashing
hackriceproject/
├── afya-quest-frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── styles/ # CSS files
│ │ ├── types/ # TypeScript types
│ │ └── utils/ # Utility functions
│ └── public/ # Static assets
│
├── afya-quest-backend/ # Express backend API
│ ├── routes/ # API routes
│ ├── models/ # Database models
│ ├── middleware/ # Custom middleware
│ ├── controllers/ # Route controllers
│ └── config/ # Configuration files
│
└── README.md
- Node.js (v14 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn
- Navigate to the backend directory:
cd afya-quest-backend- Install dependencies:
npm install- Create a
.envfile based on.env.example:
cp .env.example .env- Update the
.envfile with your configuration:
- MongoDB connection string
- JWT secret key
- Other environment variables
- Start the backend server:
npm startThe backend will run on http://localhost:5000
- Navigate to the frontend directory:
cd afya-quest-frontend- Install dependencies:
npm install- Start the development server:
npm startThe frontend will run on http://localhost:3000
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/me- Get current userPUT /api/auth/change-password- Change password
GET /api/users- Get all usersGET /api/users/:id- Get user by IDPUT /api/users/:id- Update user profile
GET /api/lessons- Get all lessonsGET /api/lessons/:id- Get lesson by IDPOST /api/lessons- Create new lessonPUT /api/lessons/:id- Update lesson
GET /api/videos- Get all videos
GET /api/questions/daily- Get daily questions
GET /api/progress- Get user progress
- Points System: Earn points for completing lessons, watching videos, and answering questions
- Levels: Progress through levels based on total points earned
- Ranks: Bronze, Silver, Gold, and Platinum CHA ranks
- Achievements: Unlock badges for various accomplishments
- Streaks: Maintain daily streaks for consistent learning
- Full bilingual support (English and Swahili)
- Toggle between languages at any time
- Content available in both languages
- Download lessons for offline access
- Cache progress locally
- Sync when connection is restored
# Frontend tests
cd afya-quest-frontend
npm test
# Backend tests
cd afya-quest-backend
npm test# Frontend build
cd afya-quest-frontend
npm run build
# Backend (ensure environment is set to production)
NODE_ENV=production npm start- Email:
[email protected] - Password:
demo123
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Designed for Community Health Assistants (CHAs)
- Built to address healthcare education challenges in remote areas
- Optimized for mobile devices and low-bandwidth environments
For questions or support, please contact the development team.