- NextJs app deployed with SST 2 via open-next
- TRPC Setup with react query ( client side, server side, server hydrating )
- Auth setup with SST auth and google provider
- Daisy Ui for the UI library
- ElectroDb for the wrapper to interface with dynamo
pnpm install
pnpm sst dev
- This will use the auth credentials in your
~/.aws/credentials
file to deploy your environment. - This will also log out your
AuthCallbackUrl
which will be needed to configure google auth
Follow the guide provided at this link.
- Skip all the actual SST setup stuff, just do the google side things
- When you get up to the client id step, copy it and replace
GOOGLE_CLIENT_ID
in.env
- When you get up to the update google redirect URI step add the url copied in the previous step plus /callback.
AuthCallbackUrl/callback
pnpm run dev
This app can be deployed to production using the following command:
pnpm run deploy:prod
This repo uses TRPC for the api. You can define new endpoints by adding to the TRPC router ( sample user endpoints are provided in src/services/controllers/userController.ts
and are registered in src/services/controllers/base/router.ts
)
These endpoints are hosted as part of the Next.js deployment and run on the BE provided by the Next.js framework. Any resources that are needed by the API should be bind'd to the NextJsSite
in the stacks
You can view your API docs on localhost:3000/api/docs
- Bump versions of next, trpc, react query and SST