Lightweight Flask web application providing a dashboard, applications listing, analytics, and a small REST API. Designed as a simple starter ship for internal dashboards and analytics frontends.
- HTML: 46.7%
- JavaScript: 22.2%
- CSS: 20.1%
- Python: 9.3%
- Shell: 1.7%
- User authentication (login/logout)
- Dashboard with charts and key metrics
- Applications listing with details and flagged items
- Location-based analytics (example data present)
- Minimal REST API endpoints to fetch application and analytics data
- Simple theme toggling and client-side utilities
- Backend: Python + Flask
- Frontend: HTML, CSS, JavaScript
- Session management: Flask-Session
- Environment handling: python-dotenv
- Deployment: gunicorn (production WSGI server)
- Entry/run script: run.py
- Requirements: requirements.txt
- Setup helper script: set_up.sh
- App package (routes, templates, static files):
app/(detailed layout printed byset_up.sh)
app/
__init__.py— Flask factory + blueprint registrationroutes.py— Page routes (dashboard, applications…)auth/routes.py— Authentication routes (login/logout)api/routes.py— REST API endpoints (e.g./api/applications)static/— CSS, JS, data (example:data/rwanda_locations.json)templates/— HTML templates (layout, dashboard, applications, analytics)
Other top-level files:
run.py— Start the development serverrequirements.txt— Python dependenciesset_up.sh— Convenience script to create venv, install deps, and run
(Full layout is echoed inside set_up.sh.)
- Python 3.8+ (3.10+ recommended)
- pip
- Optional: virtualenv/venv
- For production: a process manager and gunicorn (already in requirements)
The repository includes a helper script to create a virtual environment, install dependencies, and launch the app.
From the project root:
# Make the setup script executable and run it
chmod +x set_up.sh
./set_up.shAlternatively, manual steps:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python run.pyThe app defaults to port 5001. To override:
PORT=8080 python run.pyStart the app (development mode):
python run.py
# or using the setup script:
./set_up.shOpen: http://0.0.0.0:5001 (or the PORT you configured)
Note: run.py currently runs Flask with debug=True. For production, use gunicorn and set debug to False.
PORT— Port to run the server on (default:5001)FLASK_ENV/FLASK_DEBUG— Typical Flask environment variables (set as needed)- Add additional secrets / config via a
.envfile (python-dotenv is in requirements)
- GET /api/applications — list applications (implemented in
app/api/routes.py) - GET /api/applications/ — application details
(Refer to app/api/routes.py for exact routes and payload formats.)
- Fork the repo and open a PR against
main. - Keep changes minimal and add tests or manual verification steps for new features.
- Update README to document any significant behavior changes.
- Replace the placeholder authentication with a secure provider if exposing publicly.
- Add tests for API endpoints and core route behaviors.
- Consider disabling Flask debug mode and configuring gunicorn + systemd / Docker for production.
Add a license file (e.g., LICENSE) to indicate how the project may be used. This repository currently has no license set.
Repository: https://github.com/ishami-i/codextreme