An open-sourced fork of Jumpseat, built using Typescript, Next.js, and Prisma ORM.
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 ito install dependencies,
npx prisma generateto generate typings for the Prisma client, and
npm run devto start the development server on localhost:3000.
The database schema is stored in /prisma/schema.prisma. After editing this schema, run
npx prisma migrate devto migrate your changes to the remote database and regenerate Prisma's client typings.
To generate a Google Maps key, go to Google Cloud console and create a new project. Under APIs & Services, enable the Maps Javascript API:
To set up the database on AWS, create an Aurora Postgres database through RDS.
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.
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,
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=postgresand 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:)
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 devto set up the database with the initial migrations.
In the case that you must drop all data in the production database, you can run
node ./scripts/backup.jsto 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.jsto redeploy your saved data.




