https://github.com/sst/ideal-stack-preview
https://github.com/sst/ideal-stack-preview
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sst/ideal-stack-preview
- Owner: sst
- Created: 2022-01-04T15:37:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-04T02:35:07.000Z (over 3 years ago)
- Last Synced: 2025-05-29T04:39:42.455Z (4 months ago)
- Language: TypeScript
- Size: 813 KB
- Stars: 36
- Watchers: 5
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Ideal Stack Preview
This is a preview of the upcoming ideal stack. It is a modern starter that contains everything you need to ship full-stack serverless applications. It's built on top of SST and has tools like GraphQL already setup.
You can checkout a demo of it given at our v1 Conf [here](https://youtu.be/6FzLjpMYcu8?t=5182)
### Getting started
This is a standard SST app so you can bring everything up with `yarn start`
### File Structure
```
backend
├── core
├── functions
├── graphql
├── migrations
stacks
graphql
web
```- `backend` - Package that contains all backend code, both business logic and functions
- `core` - Contains pure business logic. Should implement features here, do things like read/write to the database.
- `functions` - Contains handlers for lambda functions. These should not contain much business logic and instead import from `core` to coordinate work
- `graphql` - This is the function for the GraphQL server. It uses Pothos to define the schema + resolvers in native typescript. You can view documentation for that library [here](https://pothos-graphql.dev/)
- `migrations` - This stack currently uses the `sst.RDS` construct and this folder contains migrations. This isnt mandatory, you can use any database you want including DynamoDB
- `stacks` - Standard SST stacks folder. Currently contains an API configured for graphql, an RDS cluster, and a static site for the frontend
- `graphql` - The new API route for graphql will handle codegeneration from pothos definitions and this is the folder it goes into. It's currently setup to generate a [genql](https://genql.vercel.app/) client for use in tests and the frontend but you can configure whatever codegen steps you want.
- `web` - A standard React application created with [vite](https://vitejs.dev/) configured with URQL to use as the GraphQL client. It has helpers in there to bring typesafety features through genql.