Welcome to the Online Examination Portal repository! This project aims to provide a platform for conducting online examinations. This README will guide you through the setup and usage of the application.
- User authentication and authorization.
- Authentication using Google.
- Once logged in, it is stored in a session for 5 minutes.
- Randomized questions for each attempt.
- Detailed result analysis for both students and administrators.
- Admin panel for managing users, exams, and results.
- Responsive design for seamless usage across devices.
To run the Online Examination Portal locally, follow these steps:
-
Clone the repository:
git clone https://github.com/321sayantan/online-exam-portal.git
-
Navigate to the project directory:
cd online-exam-portal
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and define the following variables:PORT=3000 MONGODB_URI=mongodb://localhost:27017/exam_portal SESSION_SECRET=your_session_secret
Make sure to replace
your_session_secret
with a secure random string for session management. -
Start the server:
node index.js
This will start the server at
http://localhost:3000
. -
Initialize the database:
Navigate to
http://localhost:3000/setup
in your browser to set up the initial admin user and exam categories.
Client: HTML, CSS, Bootstrap, EJS,
Server: Node, Express.
DataBase: MongoDB.
Authentication: Google OAuth.
Password Hashing: bcrypt.
Session: express.session.
Once the server is running and the initial setup is completed, you can access the Online Examination Portal through your web browser at http://localhost:3000
.
-
Student Dashboard:
- Students can log in to attempt exams, view their results, and analyze their performance.
- They can select an exam, answer questions, and submit their responses within the time limit.
-
Admin Panel:
- Administrators can log in to manage users, exams, and results.
- They have access to features like creating, editing, and deleting exams, viewing detailed result analysis, and managing user accounts.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Create a new pull request.
This project is licensed under the MIT License. Feel free to modify and distribute this code for your own projects.
Thank you for using the Online Examination Portal! If you encounter any issues or have suggestions for improvements, please don't hesitate to open an issue or reach out to the maintainers.