Skip to content

cs461-text-adventure/code

Repository files navigation

Text Adventure Game for Education

Prerequisites

Ensure you have the following installed:

Installation

1. Install Dependencies

Run the following command to install necessary dependencies:

cd /api
npm install
cd /web
npm install

2. Configure Postgres Connection

Modify the .env file located in the /api directory to specify your Postgres connection URL.

Example:

DATABASE_URL='postgres://username:password@localhost:5432/database'

3. Configure BetterAuth Connection

Generate a random value to use as your encryption seed. Modify the .env file located in the /api directory to specify this secret.

Example:

BETTER_AUTH_SECRET='sR17KEeIhzRVtfOR1StK7as6w43imxnE'

4. Configure OAuth Providers

Create OAuth applications for Discord, Google, and GitHub.

Modify the .env file located in the /api directory to specify these connections.

Example:

DISCORD_CLIENT_ID=''
DISCORD_CLIENT_SECRET=''

5. Configure Resend API

Create a Resend API key here. Modify the .env file located in the /api directory to specify this key.

Example:

RESEND_API_KEY='re_VNQodBmv_S89xwtZLAb1aerkXti43Z4qf'

6. Create Database Tables

Run the following command to generate migrations:

npx drizzle-kit generate

Run the following command to apply migrations:

npx drizzle-kit migrate

7. Configure NGINX

Update your local NGINX config file to include the routes specified in nginx-local.conf then reload NGINX.

Running the application

Start the API:

cd /api
npm run dev

Start the frontend:

cd /web
npm run dev

Documentation

localhost/api/reference
localhost/api/auth/reference

About

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •