Skip to content

ky28059/jumpseat-lite

Repository files navigation

jumpseat-lite

An open-sourced fork of Jumpseat, built using Typescript, Next.js, and Prisma ORM.

Running locally

Create a .env in the project root exporting your Postgres database / serpapi key, Google Maps key, and Next Auth secret. This should look something like

DATABASE_URL="postgres://postgres:...@...:5432/postgres"
AUTH_SECRET=...
SERP_KEY=...
NEXT_PUBLIC_GOOGLE_MAPS_KEY=...

Run

npm i

to install dependencies,

npx prisma generate

to generate typings for the Prisma client, and

npm run dev

to start the development server on localhost:3000.

The database schema is stored in /prisma/schema.prisma. After editing this schema, run

npx prisma migrate dev

to migrate your changes to the remote database and regenerate Prisma's client typings.

Google Maps setup

To generate a Google Maps key, go to Google Cloud console and create a new project. Under APIs & Services, enable the Maps Javascript API:

image

Database setup

To set up the database on AWS, create an Aurora Postgres database through RDS.

image

Since the frontend is not deployed directly on AWS through EC2, we need to configure the database to accept external connections. Follow this guide to add a security group in the VPC dashboard that allows inbound connections to :5432.

image

Once the Aurora database is configured with the above security rule, we'll also need to modify the database instance to allow public connections: under Connectivity > Additional configuration in the instance settings,

image

Finally, you should be able to connect to your database externally, e.g. via psql with

psql --host=jumpseat.cluster-[...].us-east-2.rds.amazonaws.com --port=5432 --username=postgres

and your database master password (if you didn't create the database with one, you can always add one via the Modify menu).

(note: the psql host is the the Aurora writer endpoint as seen in the console here:)

Screenshot 2025-05-02 003546

Set the DATABASE_URL in the .env to

postgres://postgres:[master password]@[aurora writer endpoint]:5432/postgres

as mentioned above, and run

npx prisma migrate dev

to set up the database with the initial migrations.

Scripts

In the case that you must drop all data in the production database, you can run

node ./scripts/backup.js

to create JSON backups of all tables in the database. Then, drop the tables as usual.

Restoring the database from the JSON backups is slightly more complex; in general, you want to restore "base" tables before restoring tables with relations that reference them (for example, you'll need to restore User before Friend).

Manually edit ./scripts/recover.js to facilitate this, then run

node ./scripts/recover.js

to redeploy your saved data.

About

Open-sourced fork of Jumpseat.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published