Skip to content

ishami-i/codextreme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codextreme project

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.


Repository language composition

  • HTML: 46.7%
  • JavaScript: 22.2%
  • CSS: 20.1%
  • Python: 9.3%
  • Shell: 1.7%

Features

  • 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

Tech stack

  • Backend: Python + Flask
  • Frontend: HTML, CSS, JavaScript
  • Session management: Flask-Session
  • Environment handling: python-dotenv
  • Deployment: gunicorn (production WSGI server)

Quick links to key files

  • Entry/run script: run.py
  • Requirements: requirements.txt
  • Setup helper script: set_up.sh
  • App package (routes, templates, static files): app/ (detailed layout printed by set_up.sh)

Project structure (overview)

app/

  • __init__.py — Flask factory + blueprint registration
  • routes.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 server
  • requirements.txt — Python dependencies
  • set_up.sh — Convenience script to create venv, install deps, and run

(Full layout is echoed inside set_up.sh.)


Prerequisites

  • Python 3.8+ (3.10+ recommended)
  • pip
  • Optional: virtualenv/venv
  • For production: a process manager and gunicorn (already in requirements)

Installation (quick)

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.sh

Alternatively, manual steps:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python run.py

The app defaults to port 5001. To override:

PORT=8080 python run.py

Running in development

Start the app (development mode):

python run.py
# or using the setup script:
./set_up.sh

Open: 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.


Environment variables

  • 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 .env file (python-dotenv is in requirements)

API (examples)

  • 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.)


Contributing

  • 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.

Notes / Next steps

  • 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.

License

Add a license file (e.g., LICENSE) to indicate how the project may be used. This repository currently has no license set.


Contact

Repository: https://github.com/ishami-i/codextreme

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors