Skip to content

dom-wuest/GradeX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GradeX 🚀

License: MIT

GradeX is a lightweight Rust + React application to manage courses, modules and grades. It consists of:

  • A Rust backend API using axum, sqlx and tokio
  • A Vite + React frontend (TypeScript)
  • SQLite for storage with SQLx migrations in migrations/

I use it to keep track of my university courses and grading information at KIT.

✨ Quick start

These commands assume Windows PowerShell, but they work similarly on macOS/Linux.

Prerequisites

  • Rust toolchain (stable) with cargo
  • Node.js (v16+) and npm or yarn
  • (Optional) sqlite3 CLI or GUI to inspect the DB

1) Get the code

git clone https://github.com/dom-wuest/GradeX.git
cd GradeX

2) Run the backend (API) 🖥️

From the repository root:

# build and run the Rust API
cargo run --release

The server listens on http://127.0.0.1:3000 by default.

3) Run the frontend (dev) 💻

Open a second terminal:

cd frontend
npm install
npm run dev

Vite starts (usually on port 5173) and proxies /api to the backend at http://127.0.0.1:3000 (see frontend/vite.config.ts).

4) Build for production 📦

To build production artifacts, run:

cargo build --release

This will also built the frontend to frontend/dist and serve it.

💾 Database & migrations

  • The server uses SQLx with an SQLite database at data/gradex.db (connection: sqlite://data/gradex.db).
  • Migrations are stored in migrations/. The repository includes an initial migration: migrations/20251008000001_init.sql.
  • To inspect the DB locally: sqlite3 data/gradex.db or use a GUI client.

If you plan to use sqlx-cli for migrations, install it and run the usual sqlx migrate commands. (I can add precise sqlx steps if you want.)

🔧 Development notes

  • If you change the API port in src/main.rs, update the proxy target in frontend/vite.config.ts.
  • Ensure the data/ directory exists and is writable by the server process.
  • Tests live under src/domain/tests.rs.

✨ Features

Feature Status
Create and manage programs, modules, and courses ✅ Complete
Drag-and-drop courses between modules ✅ Complete
Calculate GPA based on course grades and credits (truncated module averages) ✅ Complete
Responsive UI with React and Vite ✅ Complete
Dark and light themes ✅ Complete
RESTful API with axum ✅ Complete
Single app using Tauri ⬜ Coming soon
CI/CD with GitHub Actions ⬜ Coming soon

⚠️ Troubleshooting

  • Port conflict: change the port in src/main.rs or stop the other service using port 3000.
  • SQLx errors: verify data/gradex.db exists and migrations applied.
  • CORS: when using the frontend directly (not the dev proxy), ensure backend CORS settings allow the origin.

✅ Tests

Run the Rust tests:

cargo test

🤝 Contributing

PRs and issues are welcome. Please keep changes focused and add tests for new domain logic where appropriate.

📄 License

This project is released under the MIT License — see the bundled LICENSE file.

About

Web App for managing grades at KIT CS programs

Topics

Resources

License

Stars

Watchers

Forks

Contributors