## π§βπ Project 3: **Result Management System**
### π§ Objective:
Build a Flask-based web application to manage **students, subjects, and exam results**. Students will register, log in, and view their results. Admins can manage subjects and declare results.
---
### π Project Structure
```
result-management/
β
βββ app.py
βββ models.py
βββ operations.py
βββ utils.py
βββ templates/
β βββ base.html
β βββ register.html
β βββ login.html
β βββ dashboard.html
β βββ results.html
β βββ ...
βββ static/
β βββ (optional for CSS, JS, uploads)
βββ uploads/
```
---
### π Features to Implement
#### π€ **Authentication**
* Register with: name, email, roll\_no, password, and image upload (stored with UUID filename).
* Login with email + password.
* Flash messages for success/error states.
#### π **Student Dashboard**
* View name and welcome message.
* See enrolled subjects and previous result history.
#### π **Subject Management**
* Add, update, delete subjects using unique subject codes.
* Display all subjects in the dashboard.
#### π§Ύ **Result Management**
* Admin declares results by entering marks for each subject.
* Students can view their own results with subject-wise breakdown.
#### βοΈ **Utilities**
* Passwords must be hashed (already handled via `utils.newPassword()`).
* Image filenames must be UUID-based.
* Flash messages should be categorized (`success`, `danger`, `info`, `warning`).
---
### π Required Templates (Bootstrap 5)
Start with the core templates:
1. **`base.html`** β shared layout with navigation and flash message display.
2. **`register.html`** β student registration form.
3. **`login.html`** β student login form.
4. **`dashboard.html`** β welcome page, subject list, forms for adding subjects and declaring results.
5. **`results.html`** β display result details per student.
---
### π¦ Backend Models
Use **Peewee ORM**:
* `User`: name, email, roll\_no, image, password
* `Subject`: sub\_code, name
* `Result`: student (FK), declaration\_date
* `ResultItem`: result (FK), subject (FK), marks\_obtained, total\_marks
---
### π€ Upload Configuration
* Create an `uploads/` folder.
* Configure `app.config['UPLOAD_FOLDER']` in `app.py`.
* Use `uuid4()` to rename uploaded images to avoid conflicts.
* Store the image filename in the `User` model.
---
### β
Bonus (Optional)
Encourage students to:
* Add an admin panel for managing users and results.
* Improve result visualization with charts.
* Add pagination for large data.
---
### π§ͺ Evaluation Criteria
| Criteria | Weight |
| --------------------------- | ------ |
| Functional Routes | 30% |
| Clean UI with Bootstrap | 20% |
| Image Upload Handling | 10% |
| Proper DB Relationships | 20% |
| Code Modularity (views/op) | 10% |
| Error Handling & Flash Msgs | 10% |