Everything you need to get started building your next big project.
- Turborepo: For orchestrating tasks across multiple packages and apps.
- TypeScript: Ensures static type safety across the project.
- ESLint & Prettier: Maintain clean and consistent code formatting.
- Husky & Commitlint: Pre-commit hooks and git message linting for standardized commits.
- Jest & Playwright: Provides unit and end-to-end testing support.
- AWS CDK: Deploy and manage AWS infrastructure for serverless applications.
- Next.js: Build modern web applications with React and server-side rendering.
/apps- Front-end clients reside here./apis- APIs and backend services./packages- Shared libraries, configuration files, and scripts./e2e- End-to-end tests setup and configurations.
-
Click on
Use this templatein the top right corner. -
Select
Create a new repository. -
Create your repository.
-
Clone the repository locally for development:
git clone https://github.com/yourusername/your-repo-name.git cd your-repo-name -
Set up your environment variables:
Create a
.envfile in the root of the project based on the.env.examplefile provided. You can do this by running:cp .env.example .env
-
Modify the values in the
.envfile to match your local and cloud environment:STAGE: Set the project stage (e.g.,dev,prod).REGION: Specify the AWS region (e.g.,eu-central-1).AWS_PROFILE(optional): Set the AWS profile to use if you have multiple profiles configured locally.REPOSITORY: Provide the URL of the GitHub repository.BRANCH: Set the GitHub branch used for Amplify hosting.GITHUB_TOKEN: Add your GitHub personal access token for repository access during deployments.APP_URL: Set the front-end app URL for use in end-to-end tests (default ishttp://localhost:3000).
-
Install the project dependencies:
npm install
-
Start the development server:
npm run dev
-
Your app should now be running locally!
-
Install the project dependencies:
npm install
-
Start the development server:
npm run dev
-
Your app should now be running locally!
This project supports both unit tests and end-to-end tests:
- Unit tests are written using
Jest. - End-to-end tests are written using
Playwright.
-
To run unit tests:
npm run test -
To run end-to-end tests:
npm run test:e2e
Before deploying, ensure your AWS & Serverless Framework credentials are configured locally.
To deploy the infrastructure locally, run:
npm run deployNote: Your front-end app is hosted via Amplify Hosting. Deploying the infrastructure will only create the resources, in order to deploy the code you need to push your changes to the branch you provided via BRANCH env var.
The repository includes a CI/CD setup via GitHub Actions, allowing for:
- Manual deployment triggers.
- Running end-to-end tests as part of the deployment pipeline.
Here are some helpful links to documentation and tools used in this monorepo starter:
- Saapless - Learn more about the Saapless platform and its offerings.
- Turborepo Documentation - Comprehensive guide on using Turborepo for managing tasks in monorepos.
- Next.js Documentation - Everything you need to know to build modern web applications using Next.js.
- Playwright Documentation - Explore how to write reliable end-to-end tests using Playwright.
- Jest Documentation - A guide to writing unit tests with Jest.
Copyright (c) 2024 Saapless
This software is licensed under the MIT License. For more details, refer to the full LICENSE file.