Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Exam System (Flask)

An exam administration web application built with Flask. This project provides a simple admin interface for managing users and viewing logs, and it is configured to run with SQLite by default so it is easy to set up locally.

Project overview

This project is a lightweight Flask application intended for basic exam-system administration tasks. It focuses on a small but functional admin UI rather than a full student testing platform.

The app currently supports:

  • admin login
  • creating users
  • listing users
  • viewing logs
  • local database storage with SQLite

It is a good starter project for understanding how to build a Flask app with database support, environment-based configuration, and a simple web interface.

What the project uses

Backend

  • Python — the main programming language
  • Flask — the web framework used to build the application

Database

  • SQLite by default for local development
  • DATABASE_URL support for production deployments
  • Optional support for other databases such as PostgreSQL or MySQL when the proper driver is installed

Configuration

  • Environment variables
  • Optional .env file for local settings

Frontend

  • Server-rendered Flask pages for the admin interface
  • Standard HTML templates and form-based interactions

Main features

  • Admin authentication: login page for admin access
  • User management: create and list users
  • Log viewing: inspect application or activity logs
  • Simple setup: works out of the box with SQLite
  • Deployment-ready configuration: supports production database URLs

How it works

When the app starts:

  1. Flask loads the application.
  2. The database configuration is checked.
  3. If DATABASE_URL is provided, that value is used.
  4. If not, the app uses a local SQLite file named data.sqlite.
  5. If the database file does not exist, it is created automatically on first run.

This design keeps local development simple while still allowing flexible deployment.

Repository structure

The project is expected to include files such as:

  • app.py — main Flask application entry point
  • requirements.txt — Python package dependencies
  • README.md — project documentation
  • .env — optional local configuration
  • data.sqlite — SQLite database file created at runtime

Requirements

  • Python 3.10+ recommended
  • Flask 2.3.x
  • A browser to access the admin dashboard

Installation

1. Clone the repository

git clone https://github.com/sakship2005/Proctor-Exam-Project.git
cd Proctor-Exam-Project

2. Create a virtual environment

Windows PowerShell

python -m venv .venv
.\.venv\Scripts\Activate.ps1

macOS / Linux

python3 -m venv .venv
source .venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Optional: configure environment variables

Create a .env file in the project root if you want to override defaults:

FLASK_SECRET=change-me
# Optional:
# DATABASE_URL=sqlite:///C:/full/path/to/data.sqlite

5. Run the app

python app.py

6. Open the application

Visit:

http://127.0.0.1:5000/admin/login

Default login credentials:

  • Username: admin
  • Password: admin

Database configuration

SQLite default

SQLite is used by default because it:

  • requires no extra database server
  • is easy to run locally
  • makes the project portable
  • is suitable for development and demos

Production database support

If DATABASE_URL is set, the application will use that instead of SQLite. This is useful for hosting platforms like:

  • Heroku
  • Railway
  • Render

If you use a database other than SQLite, make sure the correct driver is installed:

  • PostgreSQL: psycopg2-binary
  • MySQL: pymysql

Dependencies

All Python dependencies are listed in requirements.txt.

Since SQLite is the default database, the project does not need PostgreSQL-specific packages for local use.

Deployment notes

  • GitHub Pages cannot run Flask applications because it only serves static content.
  • Better deployment options for this project include:
    • Heroku
    • Railway
    • Render
    • GitHub Codespaces for development/testing

When deploying, remember to:

  • set FLASK_SECRET
  • configure DATABASE_URL if using a production database
  • install all required Python dependencies

Security notes

  • Change the default admin credentials before using the project in production.
  • Do not commit secret values into the repository.
  • Use secure configuration for public deployments.

Possible future improvements

This project could be expanded with:

  • password hashing
  • user roles and permissions
  • exam creation and scheduling
  • student exam submission
  • scoring and result pages
  • audit logs and reports
  • improved UI styling

Summary

This is a small Flask exam administration project with a simple admin interface for user and log management. It is designed to be easy to run locally with SQLite while still supporting production database configuration through environment variables.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages