Skip to content

retkatmun/GPAsimulator

Repository files navigation

CGPA & GPA Calculator

A web application for calculating GPA (Grade Point Average) and CGPA (Cumulative Grade Point Average) with local storage for your calculations.

Features

  • GPA Calculator: Calculate semester GPA based on course grades and credits
  • CGPA Calculator: Calculate cumulative GPA across multiple semesters
  • Local Storage: Save your calculations to browser storage
  • Responsive Design: Works on desktop and mobile devices
  • No Authentication: Use immediately without signup

Technologies Used

  • Frontend: HTML, Tailwind CSS, JavaScript
  • Backend: Python Flask
  • Database: SQLite
  • Authentication: JWT (JSON Web Tokens)

Installation

  1. Install Python dependencies:

    pip install -r requirements.txt
  2. Install Node.js dependencies and build CSS:

    npm install
    npx tailwindcss -i ./src/input.css -o ./src/output.css
  3. Run the application:

    python app.py
  4. Open your browser and navigate to http://localhost:5000

Development

To watch for CSS changes during development:

npm run build-css

Or use the build script:

./build.sh

Usage

  1. Calculate GPA:
    • Enter the number of courses
    • Select grades (A=5.0, B=4.0, C=3.0, D=2.0, E=1.0, F=0.0)
    • Enter credits for each course
    • Click "Calculate GPA"
  2. Calculate CGPA:
    • Enter the number of semesters
    • Input GPA and credits for each semester
    • Click "Calculate CGPA"
  3. View History: Your calculations are automatically saved to browser storage

Grade Scale

  • A: 5.0
  • B: 4.0
  • C: 3.0
  • D: 2.0
  • E: 1.0
  • F: 0.0

API Endpoints

No API endpoints required - all calculations are done client-side with local storage.

Security Features

  • Client-side only: No server-side data storage
  • Local storage: Calculations saved in browser
  • No authentication: Immediate access without signup

File Structure

GPAsimulator/
├── app.py              # Flask backend application
├── index.html          # Main HTML page
├── script.js           # Frontend JavaScript
├── requirements.txt    # Python dependencies
├── package.json        # Node.js dependencies and scripts
├── tailwind.config.js  # Tailwind CSS configuration
├── build.sh           # Build script for CSS compilation
├── README.md          # This file
├── src/               # Source and compiled CSS files
│   ├── input.css      # Tailwind source CSS
│   └── output.css     # Compiled CSS
└── database.db        # SQLite database (created automatically)

License

This project is open source and available under the MIT License.

About

A web application for calculating GPA (Grade Point Average) and CGPA (Cumulative Grade Point Average) with local storage for your calculations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors