A guide to the folder and file structure of LaunchKit AWS, explaining how the frontend, backend, and database are organized.
package.json
: Defines project scripts and frontend dependencies..env.example
: A template for all required environment variables.docker-compose.yml
: Defines the local Postgres database service.next.config.js
: Configuration for the Next.js frontend.tailwind.config.ts
: Configuration for the Tailwind CSS utility framework.prisma/
: Contains the database schema and configuration.cdk/
: Contains all the AWS CDK infrastructure code./app
)/app
: Contains all your routes, pages, and layouts. This is where you’ll spend most of your time building UI./components
: Home to all reusable React components, organized by feature or type./lib
: A place for shared utility functions, helper scripts, and custom hooks used across the frontend./public
: For static assets like images, fonts, and favicons./cdk
)yarn deploy:prod
, the code in this directory is what provisions your resources on AWS.
/cdk/package.json
: Defines the dependencies specifically for your CDK infrastructure (e.g., aws-cdk
, aws-cdk-lib
)./cdk/bin/cdk.ts
: The entrypoint for the CDK application. It instantiates your main infrastructure stack./cdk/lib/NextJsServerlessStack.ts
: The heart of your infrastructure. This file defines all the AWS stack for your application, including the necessary resources for the Next.js app (CloudFront, S3, Lambda)./prisma
)/prisma/schema.prisma
: This is the single source of truth for your database schema. You define your data models here (e.g., User
, Team
, Subscription
), and Prisma uses this file to generate migrations and the type-safe database client./prisma/migrations
: Prisma automatically generates and stores your database migration history here.