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.
- π 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
- π 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
- π 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
- Node.js 16+ and npm
- A Firebase project (free tier available)
- Google account (for Google Sign-In setup)
- Clone the Repository
git clone https://github.com/yourusername/GPA-Calculator.git
cd GPA-Calculator- Install Dependencies
npm install- 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/- Start Development Server
npm run devOpen http://localhost:5173 in your browser.
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 SettingsYour .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.comImportant 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.
For production deployment to Vercel, Netlify, or other platforms:
- Set environment variables in your hosting platform dashboard
- All
VITE_FIREBASE_*variables must be configured - See VERCEL_DEPLOYMENT.md for detailed Vercel instructions
-
Create a Firebase Project
- Go to Firebase Console
- Click "Create Project"
- Enter project name (e.g., "GPA Calculator")
- Enable Google Analytics (optional)
-
Get Firebase Credentials
- Go to Project Settings (βοΈ icon)
- Copy your web app configuration
- Add the values to
.envfile
-
Enable Google Sign-In
- Go to Authentication β Sign-In Method
- Enable Google provider
- Add project name and support email
- Save changes
-
Configure Authorized Domains
- In Authentication β Settings β Authorized Domains
- Add
localhostandlocalhost:5173for development - Add your production domain later
-
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
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Install new dependencies
npm installGPA-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
- 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
We'd love to have you contribute! Whether you're fixing bugs, adding features, or improving documentation, all contributions are welcome.
-
Fork the Repository
- Click the "Fork" button on GitHub
- Clone your fork:
git clone https://github.com/yourusername/GPA-Calculator.git
-
Create a Feature Branch
git checkout -b feature/amazing-feature
-
Make Your Changes
- Write clean, readable code
- Follow existing code style
- Test your changes locally
-
Commit Your Changes
git add . git commit -m "Add: amazing-feature description"
-
Push to Your Fork
git push origin feature/amazing-feature
-
Open a Pull Request
- Go to the original repository
- Click "New Pull Request"
- Describe what you changed and why
- Wait for review and feedback
- β 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
// 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,
};Found a bug or have an idea? Help us improve!
- Check if the bug was already reported in Issues
- Click "New Issue" β select "Bug Report"
- Describe the bug in detail:
- What were you trying to do?
- What happened instead?
- Steps to reproduce
- Browser and device info
- Check if the feature was already requested
- Click "New Issue" β select "Feature Request"
- Describe the feature:
- What problem does it solve?
- How would you use it?
- Rough idea of how it might work
We're actively looking for collaborators! Here are some areas where we could use help:
- π 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
- π¨ UI Design - Improve visual appearance
- π± Mobile UX - Optimize for mobile devices
- π Themes - Create additional color schemes
- π Wireframes - Plan out new features
- π Write Guides - Create tutorials for users
- π Translate - Help with internationalization
- π¨βπ» Code Comments - Document complex functions
- π API Docs - Document Firebase integration
- 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)
Want to collaborate or just have questions?
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Join our community
- Email: your-email@example.com
- Twitter: @yourusername
This project is licensed under the MIT License - see the LICENSE file for details.
β
Use for personal projects
β
Modify and redistribute
β
Use commercially
β
Private use
π Include license and copyright notice
π State significant changes
Instead, email security concerns to: your-email@example.com
We take security seriously and will respond within 24 hours.
- β
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
- β GPA calculation and tracking
- β Google Sign-In authentication
- β Firebase cloud sync
- β Analytics dashboard
- β Dark/light mode
- π Advanced analytics charts
- π GPA prediction tool
- π― Goal setting and tracking
- π€ Export to PDF
- π Grade milestone notifications
- π± Mobile app (React Native)
- π Multi-language support
- π Real-time collaboration
- π Course recommendations
- π University profile integration
New to Open Source? No problem! Here's how to start:
-
Pick an Issue
- Look for "good first issue" label
- Comment: "I'd like to work on this"
- We'll provide guidance!
-
Set Up Locally
git clone https://github.com/your-username/GPA-Calculator.git cd GPA-Calculator npm install npm run dev -
Make Changes
- Edit files
- Test locally
- Make sure it works!
-
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!
- Built with β€οΈ using Vite
- Authentication powered by Firebase
- Sign-In by Google Identity
- Inspired by the academic community
- 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