A starter repository based on create-t3-turbo with some modifications to deploy to AWS using SST.
You can find more docs in Notion here
What's in the box?
- Expo mobile app
- NextJS web site
- Vite web site
- API using tRPC
brew install nvm pnpm awscli
code ~/.aws/credentials
Note If you are using multiple profiles you can use the following command to set your profile.
export AWS_PROFILE=<profile_name>
This repository uses Turso for database storage. You could easily use something else such as Supabase or Amazon RDS but it would require making changes to the packages/db
project.
In this template, @acme is used as a placeholder for package names. As a user, you might want to replace it with your own organization or project name. You can use find-and-replace to change all the instances of @acme to something like @my-company or @project-name
- Make a database at Turso
- Click your database to get your URL
- Set your DATABASE_URL in .env
- Go to Databases -> Database -> Get Token to get your token
- Set your DATABASE_TOKEN in .env
Turso is free to start.
Use the command below to make a .env and fill it in with the correct settings.
# configure environment variables
cp .env.example .env
# use node version
nvm use
# install dependencies
pnpm i
# setup SST secrets
pnpm run secrets
# push Drizzle schema to db
pnpm run db:push
Note Some lambda functions require secrets. (more about them here) To setup secrets, once you've filled in your .env file you can run the
pnpm run secrets
to set them in your AWS environment.
Terminal_1: Start backend server
<wsroot>$ pnpm run dev
Terminal_2: Start your frontend of choice
# mobile
<wsroot>$ pnpm run dev:mobile
# web (vite)
<wsroot>$ pnpm run dev:web
You can use the built in Drizzle-kit Studio to view your data
<wsroot>$ pnpm run db:studio
# Mobile apps can be deployed using EAS
# Deploy API and web using SST
<wsroot>$ pnpm run deploy --stage prod