Welcome to the Online Exam Portal, a modern and feature-rich platform designed for conducting online examinations efficiently. This project demonstrates a full-stack web application, integrating a powerful backend with a user-friendly frontend.
The platform enables students to take exams, teachers to upload and evaluate papers, and administrators to manage roles securely.
- User Registration & Login: Secure authentication system with email-based sign-up and login.
- Session-Based Authentication: Uses PostgreSQL-backed sessions for persistent logins.
- Password Encryption with BCrypt: Ensures that user credentials are securely hashed.
-
Students:
- Attempt exams and submit answers for evaluation.
- View their results after evaluation.
-
Teachers:
- Upload new question papers.
- Evaluate student answers and assign marks.
- View all student results.
- Upload Question Papers: Teachers can upload text files containing questions and answers.
- Evaluate Student Responses: Automatic and manual evaluation of answers.
- Result Generation: Generates student scores and stores them in the database.
- Role-Based Dashboard: Teachers and students see different views tailored to their access levels.
- Admin Controls: Admins can manage users and ensure a smooth workflow.
- HTML: For page structure.
- CSS: For styling and layout.
- EJS (Embedded JavaScript): For dynamic rendering of server-side templates.
- Node.js: Fast and scalable backend framework.
- Express.js: Handles routing and server logic.
- PostgreSQL: Stores users, exams, and results.
- BCrypt: Encrypts user passwords for secure authentication.
- Session-Based Authentication: Uses
connect-pg-simplefor secure session storage.
🚀 The server is live and running at:
🔗 [https://answer-sheet.onrender.com/]
Click the link above to access the Online Exam Portal and start using its features! 🎯
public/- Contains static files like CSS, JavaScript, and images.views/- Stores EJS templates for rendering dynamic web pages.uploads/- Stores uploaded question papers and other files.
db.js- Handles database connection with PostgreSQL.server.js- Main application file managing routes and logic.package.json- Contains project dependencies and scripts..env- Stores environment variables (session secrets, database credentials, etc.).README.md- Documentation for the project.
Run the following command to clone the repository:
git clone [https://github.com/your-username/Online-Exam-Portal.git](https://github.com/BikoMaster6589/Answer_Sheet.git)Install all required dependencies using:
npm install
Create a .env file in the root directory and add:
SESSION_SECRET=your_secret_key
DATABASE_URL=your_postgresql_url
###** 🏁 Run the Server ** Start the server with:
npm start📌 The server will run on: http://localhost:3000 🚀
- Upload & manage question papers
- View student evaluations
- Attempt question papers
- Submit answers for evaluation
| Method | Route | Description |
|---|---|---|
GET |
/ |
Redirect to Sign-up |
GET |
/signin |
User login page |
GET |
/home |
Dashboard (Role-based) |
GET |
/add-paper |
Add question paper (Teacher only) |
GET |
/evaluate |
Evaluate papers (Student only) |
POST |
/signup |
Register a new user |
POST |
/signin |
Login user |
✨ Thank you for exploring the Online Exam Portal! We hope this project helps in understanding and implementing online examination systems effectively.
💡 Contributions & Feedback are always welcome! Feel free to submit issues, suggest improvements, or contribute to the repository.
🚀 Happy Coding & Learning! 🎯