---
# System prepended metadata

title: PROJECT3

---


## 🧑‍🎓 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%    |

