codewit-us / codewit.us

Website for learning how to code from unique perspectives
MIT License
0 stars 0 forks source link

codewit.us

Website for learning how to code from unique perspectives

Getting Started

This project uses Nx to manage the monorepo and npm as the package manager. To use nx commands, install nx CLI globally: npm i -g nx

Environment Variables

Navigate to codewit.us/codewit/ and create a .env file with the following content:

# Frontend
YT_KEY='YOUR YOUTUBE API KEY'
YT_CHANNEL_ID='YOUR CHANNEL ID'

# Backend
GOOGLE_REDIRECT_URL="GOOGLE AUTH REDIRECT URL"
GOOGLE_CLIENT_ID="YOUR CLIENT ID"
GOOGLE_CLIENT_SECRET="YOUR SECRET"
COOKIE_KEY="ANY ALPHANUMERICAL STRING"

Running The Application

From the codewit directory, you can run nx commands

Admin Seeding

The codewit.us/codewit/api/src/scripts/seed-admins.ts file is used to seed the database with admin users. The script is run using the command npm run seed-admins.

For example to seed an admin users with the emails abc@example.com and def@example.com, run the following command:

npm run seed-admins -- --admin abc@example.com def@example.com

do note that we also need to export the following environment variables for the seeding to work, for example:

export DB_HOST=localhost
export DB_USER=codewitus_user
export DB_PASSWORD=12345
export DB_NAME=codewitus_db
export DB_PORT=5432

Contributing

See the contributing guide.

Software Overview

An overview of the features of the software is available in our roadmap