A web application for generating academic frontpage covers automatically. Built with Flask, featuring a modern UI and an admin dashboard for managing subjects and streams.
- Generate frontpage covers with user input (name, roll, registration, subject, stream, semester)
- Admin dashboard for managing subjects, streams, and viewing logs
- Responsive design optimized for mobile and desktop
- Live counter showing total documents generated
- JSON-based configuration for easy management
-
Clone the repository:
git clone https://github.com/SpreadSheets600/Frontpage-Generator.git cd Frontpage-Generator -
Install dependencies:
pip install -r requirements.txt -
Set up environment variables: Create a
.envfile with:ADMIN_API_KEY=your_secure_api_key_here PORT=5000 -
Run the application:
python main.pyVisit
http://localhost:5000in your browser.
- Fill out the form with your details (name, roll number, registration, semester, stream, subject).
- Click "Generate Document" to download the frontpage cover as a PNG.
- Navigate to
/admin/dashboard. - Enter the admin API key.
- Manage subjects: Add, edit, or delete subjects across categories (CS, ECE, AIML).
- Manage streams: Add or remove stream labels.
- View logs: See recent generation events.
GET /: Redirects to the generator pageGET /frontpages: Displays the generator formPOST /frontpages: Generates and downloads the frontpageGET /admin/dashboard: Admin dashboard pageGET /admin/subjects: Get subjects data (requires auth)POST /admin/subjects: Add a new subject (requires auth)PUT /admin/subjects: Edit an existing subject (requires auth)DELETE /admin/subjects: Delete a subject (requires auth)GET /admin/streams: Get streams data (requires auth)POST /admin/streams: Add a stream (requires auth)DELETE /admin/streams: Delete a stream (requires auth)GET /admin/logs: Get recent logs (requires auth)GET /api/stats: Get total generated documents count
This app is configured for deployment on Render:
- Push your code to GitHub.
- Create a new Web Service on Render.
- Connect your GitHub repo.
- Set build command:
pip install -r requirements.txt - Set start command:
python main.py - Add environment variables in Render's dashboard.
main.py: Flask application and API routestemplates/: HTML templates (layout, index, admin)static/: Static assets (template image, fonts)admin_config.json: Configuration for subjects and streamsfrontpage_logs.jsonl: Log of generated documentsrequirements.txt: Python dependencies
- Fork the repository.
- Create a feature branch.
- Make your changes and test thoroughly.
- Submit a pull request.