SmartPath — Guiding Students Toward Smarter Learning
Live Application: http://4.213.170.37
Video Link: https://youtu.be/DsXfkelM4Dg
Figma Architecture: https://www.figma.com/board/qOjKZB2UtkLKjXADCSCOnh/SmartPath-Azure-Web-App-Architecture?node-id=0-1&t=cDyMcd33Wh9Qbq5f-1
SmartPath Context In many African learning environments, students struggle to access organized and affordable online educational resources. SmartPath bridges this gap by providing a simple, accessible, and interactive learning platform that supports students in exploring lessons, taking quizzes, and tracking progress.
Target Users
- High school and university students
- Educators creating digital learning materials
- Independent learners seeking accessible study resources
- Students in areas with limited access to quality education
Core Features (Implemented)
- User Registration & Login: Secure authentication system with password hashing
- Landing Page: Modern, responsive home page with platform overview
- Learning Modules: Browse categorized study topics and lessons
- Interactive Quizzes: Multiple-choice quizzes with instant feedback and scoring
- User Dashboard: Personalized view of courses and progress
- Admin Panel: Content management for courses and quizzes
- Profile Management: Users can update their information
- RESTful API: Complete backend API with proper error handling
- Progress Tracking: Visual analytics of learning journey
- Achievements & Badges: Gamification elements
- Discussion Forums: Community learning features
- Mobile Optimization: Progressive Web App (PWA)
- Notifications: Learning reminders and updates
| Layer | Technology | Version | Purpose |
|---|---|---|---|
| Frontend | React.js | 18.2.0 | UI Framework |
| React Router | 6.15.0 | Client-side routing | |
| CSS3 | - | Styling | |
| Backend | Flask | 2.3.3 | Web framework |
| Flask-CORS | 4.0.0 | Cross-origin support | |
| SQLite | 3 | Database | |
| Security | Werkzeug | - | Password hashing |
| JWT | (future) | Token authentication | |
| Testing | pytest | 7.4.0 | Backend testing |
| Jest | - | Frontend testing | |
| DevOps | Git | - | Version control |
| GitHub Actions | - | CI/CD (future) |
Before you begin, ensure you have the following installed:
- Node.js (v16.0.0 or higher) - Download here
- Python (v3.10 or higher) - Download here
- Git - Download here
- npm (comes with Node.js)
- pip (comes with Python)
git clone https://github.com/Kosisookeke/smartpath.git
cd smartpathcd backendWindows:
python -m venv venv
.\venv\Scripts\activatemacOS/Linux:
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython init_db.pypython app.pyThe backend API will run on http://localhost:5000
pytest tests/cd frontendnpm installnpm startThe app will open automatically at http://localhost:3000
npm testsmartpath/
├── backend/ # Python Flask backend
│ ├── app/ # Application package
│ │ ├── __init__.py # Flask app factory
│ │ ├── models.py # Database models (User, Course, Quiz, etc.)
│ │ ├── auth.py # Authentication routes
│ │ ├── courses.py # Course management routes
│ │ ├── quizzes.py # Quiz functionality routes
│ │ ├── admin.py # Admin panel routes
│ │ └── utils.py # Helper functions
│ ├── tests/ # Backend unit tests
│ │ ├── test_auth.py
│ │ ├── test_courses.py
│ │ └── test_quizzes.py
│ ├── database/ # SQLite database location
│ │ └── smartpath.db
│ ├── app.py # Main application entry point
│ ├── init_db.py # Database initialization script
│ ├── requirements.txt # Python dependencies
│ └── .env.example # Environment variables template
│
├── frontend/ # React frontend
│ ├── public/ # Static files
│ │ ├── index.html
│ │ └── favicon.ico
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── Navbar.js
│ │ │ ├── Footer.js
│ │ │ ├── CourseCard.js
│ │ │ ├── QuizCard.js
│ │ │ └── ProtectedRoute.js
│ │ ├── pages/ # Page components
│ │ │ ├── Home.js
│ │ │ ├── Login.js
│ │ │ ├── Register.js
│ │ │ ├── Dashboard.js
│ │ │ ├── Courses.js
│ │ │ ├── CourseDetail.js
│ │ │ ├── Quiz.js
│ │ │ ├── QuizResult.js
│ │ │ ├── Profile.js
│ │ │ └── Admin.js
│ │ ├── services/ # API communication
│ │ │ └── api.js
│ │ ├── context/ # React Context (Auth)
│ │ │ └── AuthContext.js
│ │ ├── App.js # Main app component
│ │ ├── App.css # Global styles
│ │ └── index.js # Entry point
│ ├── package.json
│ └── .gitignore
│
├── .gitignore
├── LICENSE # MIT License
└── README.md # This file
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/user- Get current user infoPUT /api/auth/user- Update user profile
GET /api/courses- Get all coursesGET /api/courses/<id>- Get specific coursePOST /api/courses- Create course (admin only)PUT /api/courses/<id>- Update course (admin only)DELETE /api/courses/<id>- Delete course (admin only)
GET /api/quizzes- Get all quizzesGET /api/quizzes/<id>- Get specific quizPOST /api/quizzes/<id>/submit- Submit quiz answersGET /api/quizzes/<id>/results- Get quiz resultsPOST /api/quizzes- Create quiz (admin only)
GET /api/admin/stats- Get platform statisticsGET /api/admin/users- Get all usersPUT /api/admin/users/<id>- Update user role
cd backend
pytest tests/ -v
pytest tests/test_auth.py -v # Test specific module
pytest --cov=app tests/ # With coverage report
# Linting
flake8 app/ tests/cd frontend
npm test # Run all tests
npm test -- --coverage # With coverage report
# Linting
npm run lintThis project uses GitHub Actions for continuous integration and deployment.
- Automated linting (flake8 for Python, ESLint for JavaScript)
- Automated testing (pytest and Jest)
- Docker image building and validation
- Branch protection on
main - Required status checks before merging
- Pushes to any branch except
main - Pull requests targeting
main
For detailed CI/CD setup instructions, see CI_SETUP.md
For testing purposes, the following accounts are created:
Admin Account:
- Email:
admin@smartpath.com - Password:
admin123
Student Account:
- Email:
student@smartpath.com - Password:
student123
- Password hashing using Werkzeug security
- CORS protection configured
- Input validation and sanitization
- SQL injection prevention (parameterized queries)
- XSS protection
- JWT token authentication (coming soon)
- Rate limiting (coming soon)
Issue: ModuleNotFoundError: No module named 'flask'
# Ensure virtual environment is activated and reinstall
pip install -r requirements.txtIssue: Database errors
# Delete and recreate database
rm database/smartpath.db
python init_db.pyIssue: Port 5000 already in use
# Change port in app.py or kill process using port
# Windows: netstat -ano | findstr :5000
# Linux/Mac: lsof -i :5000Issue: npm install fails
# Clear npm cache and retry
npm cache clean --force
npm installIssue: Cannot connect to backend
- Ensure backend is running on
http://localhost:5000 - Check
proxysetting inpackage.json
main- Production-ready codedevelop- Development branchfeature/*- New featuresbugfix/*- Bug fixeshotfix/*- Urgent fixes
type(scope): subject
body
footer
Types: feat, fix, docs, style, refactor, test, chore
Example:
feat(auth): add password reset functionality
- Add password reset endpoint
- Create email template for reset link
- Add frontend form for password reset
Closes #123
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Make your changes
- Run tests
# Backend cd backend && pytest # Frontend cd frontend && npm test
- Commit your changes
git commit -m 'feat: add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow PEP 8 for Python code
- Use ESLint configuration for JavaScript
- Write tests for new features
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- SmartPath Development Team
- All contributors and supporters
- The open-source community
- React and Flask communities
- GitHub Issues: Report bugs or request features
- Email: support@smartpath.com
- Documentation: Full documentation
- MVP Launch (Authentication, Courses, Quizzes)
- Mobile responsiveness improvements
- Progress tracking dashboard
- Progressive Web App (PWA)
- Email notifications
- Gamification features
- Discussion forums
- Video lessons support
- Multi-language support
- AI-powered recommendations
- Advanced analytics
- Third-party integrations
Made with ❤️ by the SmartPath Team
Empowering learners across Africa and beyond
Star this repository if you find it helpful!