Nibble is a platform for programming courses that allows students to learn by doing, help teachers to automate the evaluation process and provide a better learning experience for students because they don't have to wait for the teacher to evaluate their work. Nibble also generates reports so teachers can have a better understanding of their students' progress and necessities.
Nibble is divided in two subsystems: the evaluator and the web platform that students and teachers use.
-
The evaluator is a Python server application that evaluates the students' code.
-
The web platform is a Next.js application that runs in a server and allows students and teachers to interact with the system.
This is the repository for the web platform.
Run the following command to create the PostgreSQL database using Docker.
docker run --name nibble -e POSTGRES_PASSWORD=1234 -e POSTGRES_DB=nibble -d -p 5432:5432 postgres
- Clone this repo into your local machine
- Go to the root folder in your terminal
- Generate the
.envfile running the following commandcp .env.example .env - Add valid environment variables to
.env(ask Agustín for Clerk environment variables or generate your own Clerk project) - Use Node.js version
18.16.0. If you use nvm, runnvm useto use the correct version. Later, maybe we create a Docker container to run this web application - Install pnpm globally, if you don't have it already
- Run
pnpm installto install dependencies - Run
pnpm db:pushto push database schema - Run
pnpm db:seedto seed database - Run
pnpm devto start app
-
If you change the database schema, run the command
pnpm db:pushto update the database. Modify the seed file if necessary. Since we're not deploying this web platform anywhere and just running it locally, we aren't managing database migrations and directly push the schema instead. -
If you want to reset the database, run the command
pnpm db:reset, and then runpnpm db:push. Optionally, you can runpnpm db:seedto generate data.