This app enables the online payment of admission/accomodation/study taxes at the University of Bucharest.
You need to have the latest stable versions of Node.js and npm installed.
If it is the first time you're running the app, you will have to install all of the required package dependencies by running npm install in the root directory.
The app requires a PostgreSQL database to be available. The easiest way to spin up one locally is by installing Docker and then running:
docker compose upPrisma is our chosen ORM. Some useful commands:
-
To use the Prisma CLI with the development database:
npm run prisma
-
To initialize the database, or to push changes without creating a migration:
npm run prisma:push
-
To synchronize the database and create a migration:
npm run prisma:migrate --name "migration name" -
To generate or update the Prisma client:
npm run prisma:generate
This step is required after every schema change, because the Prisma client is dynamically generated and stored in a subdirectory of the
node_modulesfolder, which is not commited into version control. -
To seed the database with some fake data for development purposes:
npm run seed:dev
The app uses NextAuth.js to provide support for authentication using Microsoft Entra ID. In development, you have to create a .env.local file in the root directory and define the following environment variables:
ENTRA_ID_CLIENT_SECRET=<client secret created for app>
The app utilizes Google ReCAPTCHA v2 Checkbox. In development, please add the following keys to your .env.local file:
NEXT_PUBLIC_RECAPTCHA=<The site/public key>
RECAPTCHA_SERVER=<Your private key for verifying the reCAPTCHA token>
To start a local development server, use:
npm run devTo format the code automatically using Prettier, use:
npm run formatTo check for code issues using ESLint, run:
npm run lintThe following environment variables must be defined for the app to function properly:
NEXTAUTH_URL=<app's canonical base URL>
NEXTAUTH_SECRET=<cryptographically secure secret key, to be used for encryption>
ENTRA_ID_TENANT_ID=<ID of tenant in which app resides>
ENTRA_ID_CLIENT_ID=<client ID of app registration>
ENTRA_ID_CLIENT_SECRET<client secret created for app>
NEXT_PUBLIC_RECAPTCHA=<The site/public key>
RECAPTCHA_SERVER=<Your private key for verifying the reCAPTCHA token>