Welcome to DRAP: the Draft Ranking Automated Processor for the University of the Philippines Diliman - Department of Computer Science's yearly draft of research lab assignments. In a nutshell, this web application automates the mechanics of the draft:
The main web application is powered by SvelteKit. Data persistence is backed by PostgreSQL.
For local development, we use a Docker Compose to build an image of PostgreSQL with the required extensions. See the Dockerfile
for more details.
As the image builds on top of the official postgres
image, the following environment variables (stored in a .env
file at the project root) will be relevant to the image initialization.
Variable | Description |
---|---|
POSTGRES_PASSWORD |
The password that will be used to initialize the local PostgreSQL instance. |
POSTGRES_USER |
Used in conjunction with POSTGRES_PASSWORD to set up the initial database user. |
See more initialization variables here. In most cases, however, the default values are fine with some standard password like "password". There is no need to overthink it as the instance should only be local for development.
At runtime, the server requires the following environment variables to be present.
Variable | Description |
---|---|
POSTGRES_URL |
The connection string to the PostgreSQL instance. |
GOOGLE_OAUTH_CLIENT_ID |
OAuth 2.0 credentials retrieved from the [Google Cloud Console]. |
GOOGLE_OAUTH_CLIENT_SECRET |
OAuth 2.0 credentials retrieved from the [Google Cloud Console]. |
GOOGLE_OAUTH_REDIRECT_URI |
OAuth 2.0 credentials retrieved from the [Google Cloud Console]. |
# Install dependencies.
pnpm install
# Check formatting.
pnpm fmt # prettier
# Apply formatting auto-fix.
pnpm fmt:fix # prettier --write .
# Check linting rules.
pnpm lint:eslint
pnpm lint:svelte
# Perform all lints in parallel.
pnpm lint
# Run the Vite dev server for SvelteKit.
pnpm dev
# Run the Vite preview server for SvelteKit.
pnpm preview
# Build the main web application (SvelteKit).
pnpm build
node --env-file=.env build/index.js
The DRAP project, licensed under the GNU Affero General Public License v3, was originally developed by Sebastian Luis S. Ortiz and Victor Edwin E. Reyes as a service project under the UP Center for Student Innovations. The DRAP logo and banner were originally designed and created by Angelica Julianne A. Raborar.