Aura's African Football League is a website for African football. It has three user types: administrators, federations, and visitors. Users can register and log in to access their own dashboard. The design uses African colors like green, gold, and red with football themes. The site works on phones and computers without needing special frameworks.
# Aura's African Football League (AAFL)
A full-stack prototype platform for managing African football federations, teams, and a knockout tournament. Includes secure federation self‑registration, admin match simulation with AI/fallback commentary, and progressive tournament bracket visualization (Quarterfinals → Semifinals → Final → Champion).
---
## Features
- Federation Registration (password hashed with bcrypt)
- Role-based Login (administrator, federation, visitor passwordless)
- JWT Authentication (12h expiry)
- Knockout Tournament Engine (auto progression of winners)
- Match Simulation:
- Quick simulate (random scores + penalties if draw)
- Play with commentary (OpenAI if API key supplied, otherwise fallback generator)
- Leaderboard (aggregate results across simulated matches)
- Administrator Dashboard (stats, teams, matches, bracket, deletion)
- Dynamic Bracket Rendering (completed vs pending matches clearly separated)
- Email Notification Hook (nodemailer integration placeholder)
- Secure Password Storage (bcryptjs)
- Modular Services (tournamentService, emailService)
---
## Tech Stack
| Layer | Technology |
|------------|------------|
| Frontend | HTML, CSS, Vanilla JS |
| Backend | Node.js, Express.js |
| Database | MongoDB Atlas (Mongoose ODM) |
| Auth | JWT + bcrypt password hashing |
| Email | Nodemailer (optional) |
| AI Commentary | OpenAI API (optional) |
---
## Repository Structure
```
Index.html/ # Repo root (frontend + server folder)
index.html # Landing page
register.html/.css/.js
login.html/.css/.js
admin_home.html/.css/.js
federation_home.html/.css/.js
visitor_home.html/.css/.js
style.css, script.js # Global/home assets
server/ # Backend source
server.js # Express entrypoint
routes/ # admin, auth, federation, visitor routes
models/ # Mongoose models (User, Team, Match, etc.)
services/ # Tournament + email services
seed.js # Database se …