Skip to content

Jithmi25/GPA-Calculator

πŸ“š GPA Calculator

A modern, secure web application for calculating and tracking your GPA across semesters. Built with Firebase, Vite, and Google Sign-In for seamless authentication and data synchronization.

Version License Status


✨ Features

Core Functionality

  • πŸ“Š GPA Calculator - Calculate semester and cumulative GPA
  • πŸ“ˆ Analytics Dashboard - Visualize your academic progress with charts
  • πŸ’Ύ Semester Management - Create, edit, and delete semesters
  • πŸ“ Course Tracking - Add/remove courses with grades and credits
  • πŸ“‹ Grade History - View all past grades and calculations
  • πŸŽ“ Grade Info Reference - Grade scales and conversion information

User Experience

  • πŸŒ™ Dark/Light Mode - Toggle between themes
  • πŸ“± Fully Responsive - Works seamlessly on mobile and desktop
  • πŸ”„ Cloud Sync - All data synced with Firebase
  • ⚑ Fast & Instant - Built with Vite for optimal performance
  • πŸ” Secure - Firebase Authentication with Google Sign-In

Data Management

  • πŸ”‘ Google Authentication - Sign in with your Google account
  • πŸ‘€ Guest Mode - Calculate without signing in
  • ☁️ Cloud Storage - Data persisted in Firebase Realtime Database
  • πŸ“Š Export Ready - Easy access to your academic data

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm
  • A Firebase project (free tier available)
  • Google account (for Google Sign-In setup)

Installation

  1. Clone the Repository
git clone https://github.com/yourusername/GPA-Calculator.git
cd GPA-Calculator
  1. Install Dependencies
npm install
  1. Configure Environment Variables
# Copy the example file
cp .env.example .env

# Edit .env with your Firebase credentials
# Get them from Firebase Console: https://console.firebase.google.com/
  1. Start Development Server
npm run dev

Open http://localhost:5173 in your browser.


πŸ”’ Security & Configuration

Environment Variables

Firebase credentials are managed through environment variables using Vite:

# 1. Copy the example file
cp .env.example .env

# 2. Edit .env and add your Firebase credentials
# Get them from: https://console.firebase.google.com/ β†’ Project Settings

Your .env file should contain:

VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id
VITE_FIREBASE_DATABASE_URL=https://your-project.firebaseio.com

Important Note: Firebase web API keys are public by design and safe to expose. Security is enforced through:

  • βœ… Firebase Security Rules (see database.rules.json)
  • βœ… User authentication requirements
  • βœ… Domain restrictions in Firebase Console

See SECURITY.md for detailed security information.

Deployment

For production deployment to Vercel, Netlify, or other platforms:

  1. Set environment variables in your hosting platform dashboard
  2. All VITE_FIREBASE_* variables must be configured
  3. See VERCEL_DEPLOYMENT.md for detailed Vercel instructions

πŸ“– Setup Guide

Firebase Configuration

  1. Create a Firebase Project

    • Go to Firebase Console
    • Click "Create Project"
    • Enter project name (e.g., "GPA Calculator")
    • Enable Google Analytics (optional)
  2. Get Firebase Credentials

    • Go to Project Settings (βš™οΈ icon)
    • Copy your web app configuration
    • Add the values to .env file
  3. Enable Google Sign-In

    • Go to Authentication β†’ Sign-In Method
    • Enable Google provider
    • Add project name and support email
    • Save changes
  4. Configure Authorized Domains

    • In Authentication β†’ Settings β†’ Authorized Domains
    • Add localhost and localhost:5173 for development
    • Add your production domain later
  5. Set Up Realtime Database

    • Go to Realtime Database
    • Create database in test mode (for development)
    • Update security rules for production:
    {
      "rules": {
        "users": {
          "$uid": {
            ".read": "$uid === auth.uid",
            ".write": "$uid === auth.uid"
          }
        }
      }
    }

πŸ“– Full Setup Guide: See GOOGLE_LOGIN_SETUP.md


πŸ› οΈ Development

Available Commands

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Install new dependencies
npm install

Project Structure

GPA-Calculator/
β”œβ”€β”€ index.html                   # Main application
β”œβ”€β”€ login.html                   # Google Sign-In page
β”œβ”€β”€ vite.config.js              # Vite configuration
β”œβ”€β”€ package.json                # Dependencies
β”œβ”€β”€ .env                        # Firebase credentials (secret)
β”œβ”€β”€ .env.example                # Template for .env
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ GOOGLE_LOGIN_SETUP.md       # Authentication setup
└── SETUP.md                    # Original setup guide

Technology Stack

  • Frontend: HTML5, CSS3, JavaScript (ES6+)
  • Build Tool: Vite
  • Authentication: Firebase Auth + Google Sign-In
  • Database: Firebase Realtime Database
  • Hosting: Ready for Firebase Hosting / Vercel / Netlify
  • Styling: CSS3 with CSS Variables for theming

🀝 Contributing

We'd love to have you contribute! Whether you're fixing bugs, adding features, or improving documentation, all contributions are welcome.

How to Contribute

  1. Fork the Repository

    • Click the "Fork" button on GitHub
    • Clone your fork: git clone https://github.com/yourusername/GPA-Calculator.git
  2. Create a Feature Branch

    git checkout -b feature/amazing-feature
  3. Make Your Changes

    • Write clean, readable code
    • Follow existing code style
    • Test your changes locally
  4. Commit Your Changes

    git add .
    git commit -m "Add: amazing-feature description"
  5. Push to Your Fork

    git push origin feature/amazing-feature
  6. Open a Pull Request

    • Go to the original repository
    • Click "New Pull Request"
    • Describe what you changed and why
    • Wait for review and feedback

Contribution Guidelines

  • βœ… Write descriptive commit messages
  • βœ… Keep commits focused on one feature/bug fix
  • βœ… Test changes in both light and dark modes
  • βœ… Test on mobile and desktop
  • βœ… Update documentation if needed
  • βœ… No console errors or warnings

Code Style

// Use arrow functions
const calculateGPA = (courses) => {
  // Clear variable names
  const totalCredits = courses.reduce((sum, c) => sum + c.credits, 0);
  return totalCredits > 0 ? gpa : 0;
};

// Use meaningful names
const semester = {
  name: "Fall 2025",
  courses: [],
  gpa: 0.0,
};

πŸ“‹ Feature Requests & Bug Reports

Found a bug or have an idea? Help us improve!

Report a Bug

  1. Check if the bug was already reported in Issues
  2. Click "New Issue" β†’ select "Bug Report"
  3. Describe the bug in detail:
    • What were you trying to do?
    • What happened instead?
    • Steps to reproduce
    • Browser and device info

Request a Feature

  1. Check if the feature was already requested
  2. Click "New Issue" β†’ select "Feature Request"
  3. Describe the feature:
    • What problem does it solve?
    • How would you use it?
    • Rough idea of how it might work

πŸ‘₯ Collaborators

We're actively looking for collaborators! Here are some areas where we could use help:

Wanted: Developers

  • πŸ› Bug Fixes - Find and fix issues
  • ✨ New Features - Add cool functionality
  • 🎨 UI/UX Improvements - Make it look and feel better
  • πŸ“Š Advanced Analytics - Better charts and insights

Wanted: Designers

  • 🎨 UI Design - Improve visual appearance
  • πŸ“± Mobile UX - Optimize for mobile devices
  • 🌈 Themes - Create additional color schemes
  • πŸ“ Wireframes - Plan out new features

Wanted: Documentation

  • πŸ“ Write Guides - Create tutorials for users
  • 🌐 Translate - Help with internationalization
  • πŸ‘¨β€πŸ’» Code Comments - Document complex functions
  • πŸ“š API Docs - Document Firebase integration

Areas for Improvement

  • Unit tests and integration tests
  • PWA support (offline mode)
  • Multiple semester view
  • Grade prediction tool
  • GPA trend analysis
  • Export to PDF
  • API endpoint for mobile app
  • Accessibility improvements (WCAG)
  • Performance optimization
  • Internationalization (i18n)

πŸ“ž Get in Touch

Want to collaborate or just have questions?


πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

What You Can Do

βœ… Use for personal projects
βœ… Modify and redistribute
βœ… Use commercially
βœ… Private use

What You Must Do

πŸ“‹ Include license and copyright notice
πŸ“‹ State significant changes


πŸ” Security

Reporting Security Issues

⚠️ Do not open a public GitHub issue for security vulnerabilities.

Instead, email security concerns to: your-email@example.com

We take security seriously and will respond within 24 hours.

Security Best Practices

  • βœ… Firebase credentials stored in .env (never committed)
  • βœ… Google OAuth 2.0 for secure authentication
  • βœ… Firebase Security Rules protect user data
  • βœ… HTTPS enforced in production
  • βœ… No sensitive data in browser console

🎯 Roadmap

v1.0 (Current)

  • βœ… GPA calculation and tracking
  • βœ… Google Sign-In authentication
  • βœ… Firebase cloud sync
  • βœ… Analytics dashboard
  • βœ… Dark/light mode

v1.1 (Planned)

  • πŸ“‹ Advanced analytics charts
  • πŸ“Š GPA prediction tool
  • 🎯 Goal setting and tracking
  • πŸ“€ Export to PDF
  • πŸ”” Grade milestone notifications

v2.0 (Future)

  • πŸ“± Mobile app (React Native)
  • 🌐 Multi-language support
  • πŸ”„ Real-time collaboration
  • πŸ“š Course recommendations
  • πŸŽ“ University profile integration

πŸ’‘ How to Get Started Contributing

New to Open Source? No problem! Here's how to start:

  1. Pick an Issue

    • Look for "good first issue" label
    • Comment: "I'd like to work on this"
    • We'll provide guidance!
  2. Set Up Locally

    git clone https://github.com/your-username/GPA-Calculator.git
    cd GPA-Calculator
    npm install
    npm run dev
  3. Make Changes

    • Edit files
    • Test locally
    • Make sure it works!
  4. Submit Pull Request

    • Describe what you changed
    • Reference the issue number
    • We'll review and merge! πŸŽ‰

Questions? Open an issue or email us. We're here to help!


πŸ™Œ Acknowledgments


πŸ“Š Project Stats

GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests


πŸ“ Recent Updates

  • Feb 27, 2026 - Google Sign-In integration complete πŸŽ‰
  • Feb 25, 2026 - Firebase authentication setup
  • Feb 20, 2026 - Project initialization with Vite

Star ⭐ us on GitHub to stay updated!


Made with πŸ’œ by the GPA Calculator Community

⬆ back to top

About

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors