
OOPS (Object-Oriented Programming System) is a gamified web application designed to enhance the learning experience for the "Programowanie Obiektowe" course at AGH University. The application leverages gamification techniques to motivate students, streamline course management for instructors, and provide intuitive tools for coordinators to oversee the course.
This project is based on the foundation laid by Soamid/obiektowe-lab.
- Track Progress: View personal statistics, including points, levels, and rewards.
- Hall of Fame: Compare your progress with anonymized rankings of other students.
- Open Chests: Earn chests and claim rewards to enhance your course performance.
- Personalized Profile: Customize your avatar and nickname.
- Manage Groups: Assign points, manage student groups, and track their progress.
- Award Points and Rewards: Allocate points for assignments and distribute chests.
- Monitor Group Statistics: Access group-level statistics to improve teaching strategies.

- Course Configuration: Define grading categories, levels, and conditions for course completion.
- Manage Participants: Oversee students, instructors, and group assignments.
- Advanced Analytics: Analyze course-wide data and adjust configurations as needed.

demo.mp4
- Frontend: ReactJS with TypeScript
- Backend: Kotlin with Spring Boot
- Database: PostgreSQL
- API: GraphQL
- Hosting: Dockerized application hosted on Oracle Cloud
- Authentication: Firebase Authentication
- Experience Points (XP): Earn XP through activities like labs, quizzes, and projects.
- Levels: Progress through levels as you earn more XP, directly correlating to your course grade.
- Rewards and Chests: Open chests to gain additional XP, multipliers, or other bonuses.
- Hall of Fame: Compete in a friendly ranking system with other students.
This is a step-by-step guide on how to run OOPS application locally.
-
Clone this repository with
git clone https://github.com/Szyntos/oops.git
-
Cd into backend directory
cd oops/backend
-
Run Docker desktop
-
Run
docker compose --env-file ../.env up -d
.Note: If you're on Windows/Linux you should remove
platform: linux/arm64/v8
fromdocker-compose.yaml
-
Open Intellij Idea in backend project folder
-
Setup sdk to use Java 17. (On MacOs click
cmd + ;
) -
Build a project with gradle, alternatively run
./gradlew build
(./gradlew.bat build
for Windows) -
Run
BackendApplication
file, alternatively run./gradlew bootRun
(./gradlew.bat bootRun
for Windows) -
If something doesnt work make sure sdk is correctly set up and all dependencies are downloaded
-
Apply hasura metadata by
cd hasura
,hasura metadata apply
-
If there are any updates to backend do git pull, rebuild a project and apply hasura metadata again
-
To access hasura console go to
localhost:9191
. The password isadmin_secret
-
To populate the database run
cd backend/src/main/python/
andpython insert_data.py
. This script purges the existing data from the database and repopulates the database with random (set seed) data.
- Cd frontent directory
cd ../frontend
- Make sure yarn is installed
npm install --global yarn
- Run
yarn
- Run
yarn codegen
- Run
yarn dev
To deploy the application, follow the steps below:
- Install docker and docker-compose on the server.
- Clone this repository with
git clone https://github.com/Szyntos/oops.git
- Cd into repository
cd oops
- Run
mkdir backend/resources
- Run
nano
.env` and setup environment variables - Run
deploy.sh
The application relies on the following environment variables for configuration. Ensure you define these variables in a .env
file in the root of the project.
- POSTGRES_USER: The username for the PostgreSQL database.
- POSTGRES_PASSWORD: The password for the PostgreSQL database.
- POSTGRES_DB: The name of the PostgreSQL database.
- HASURA_GRAPHQL_DATABASE_URL: The database URL for Hasura in the format
postgres://<user>:<password>@<host>:<port>/<dbname>
. - POSTGRES_URL: JDBC connection URL for the PostgreSQL database (
jdbc:postgresql://host.docker.internal:6543/<dbname>
).
- HASURA_GRAPHQL_ADMIN_SECRET: The admin secret required for accessing Hasura's GraphQL APIs.
- HASURA_GRAPHQL_JWT_SECRET: The JWT secret for authentication in Hasura.
- MAIL_HOST: The mail server's host (e.g.,
smtp.gmail.com
for Gmail). - MAIL_PORT: The mail server's port.
- MAIL_USERNAME: The username for the mail server.
- MAIL_PASSWORD: The password for the mail server.
- MAIL_SMTP_AUTH: Whether SMTP authentication is enabled (
true
orfalse
). - MAIL_SMTP_AUTH_STARTTLS_ENABLE: Whether STARTTLS is enabled for the SMTP server.
- MAIL_FROM: The email address used for sending emails.
- VITE_FIREBASE_API_KEY: Firebase API key.
- VITE_FIREBASE_AUTH_DOMAIN: Firebase Authentication domain.
- VITE_FIREBASE_PROJECT_ID: Firebase project ID.
- VITE_FIREBASE_STORAGE_BUCKET: Firebase storage bucket.
- VITE_FIREBASE_MESSAGING_SENDER_ID: Firebase messaging sender ID.
- VITE_FIREBASE_APP_ID: Firebase app ID.
- VITE_FIREBASE_MEASUREMENT_ID: Firebase analytics measurement ID.
- VITE_EMAIL_DOMAIN: The email domain used in the application as the default student's email domain.
- VITE_PUBLIC_IP: The public IP address of the application.
- BACKEND_GRAPHQL_URL: The backend GraphQL server URL (e.g.,
http://host.docker.internal:9090/graphql
). - CORS_ALLOWED_ORIGIN: The allowed origins for CORS (Cross-Origin Resource Sharing).
- FIREBASE_SECRET_JSON_BASE64: The base64-encoded Firebase secret JSON.
- DO_INSERT_DEMO_DATA: Whether to insert demo data into the database (
true
orfalse
). - INIT_DATA: Whether to insert minimal data (
true
orfalse
). - DO_INSERT_FILES: Whether to insert initial files into the system (
true
orfalse
). - ADMIN_MAIL: The admin email address for logging in to the system.
- BYPASS_AUTH: Whether to bypass authentication for development (
true
orfalse
). - VITE_BYPASS_TOKEN: Token prefix used when authentication is bypassed.
This project was developed by:
with supervision by: