file: ./content/docs/enterprise-commerce/index.mdx meta: { "title": "Enterprise Commerce", "description": "Build a scalable, secure, and performant e-commerce platform with Next.js" } In progress... file: ./content/docs/next-enterprise/index.mdx meta: { "title": "Getting Started", "description": "Get to know the project, philosophy and how to use it.", "icon": "Telescope" } import { Step, Steps } from 'fumadocs-ui/components/steps'; # Introduction `next-enterprise` is an carefully crafted Next.js boilerplate for enterprise, high-performance, maintainable applications and fast iterating teams. Packed with features like **TailwindCSS v4**, **Extremely strict TypeScript**, **ESLint 9**, **Prettier**, **testing tools** and more to accelerate your development and help to bootstrap your project faster. ## Philosophy While numerous **Next.js** boilerplates exist in the market today, the majority are designed to address individual developer requirements rather than the strategic needs of development teams, particularly those operating in enterprise environments. Many solutions incorporate excessive features and tooling that add complexity without proportional value. In `next-enterprise`, based on our enterprise clients, we recognize that operational efficiency originates from strategic simplicity. Our solution delivers a streamlined, enterprise-ready foundation with carefully selected, high-impact features and tools that maximize developer productivity and accelerate time-to-market for your business-critical applications. ## Documentation purpose This documentation serves as a comprehensive technical reference for the project features and a practical guide for enterprise application development. It incorporates knowledge gained from our work with large organizations. You will find detailed guidelines, best practices, and recommendations, along with explanations of our decision-making process that emphasizes business value. ## Installation ### Clone the project ```bash git clone https://github.com/blazity/next-enterprise.git ``` *...or using GitHub CLI* ```bash gh repo clone blazity/next-enterprise ``` ### Enable corepack ```bash corepack enable && corepack enable npm ``` This needs to be done only once - you do not need to run it again for other projects. The `corepack enable npm` command may seem unreasonable as we are using `pnpm`. It is well explained in the [Matt's TotalTypeScript article](https://www.totaltypescript.com/how-to-use-corepack#why-do-we-need-corepack-enable-npm) ### Install dependencies ```bash pnpm install --frozen-lockfile ``` ### Run the project ```bash pnpm dev ``` You can now begin development on your project. We recommend reviewing the rest of the documentation to understand the project structure and the business benefits our configuration provides. file: ./content/docs/next-enterprise/deployments/amazon-web-services.mdx meta: { "title": "Amazon Web Services", "description": "Learn about deployments of the next-enterprise boilerplate applications directly to the AWS Cloud", "icon": "Fa6BrandsAws" } import {Accordions, Accordion} from "fumadocs-ui/components/accordion" import {Step, Steps} from "fumadocs-ui/components/steps" import {Video} from "../../../../app/_components/video.tsx" ## AWS provider features overview * Automated provisioning of AWS infrastructure * Scalable & secure setup using: * VPC * Elastic Container Service (ECS) * Elastic Container Registry (ECR) * Application Load Balancer * S3 + CloudFront for static assets * AWS WAF (Web Application Firewall) * Redis Cluster for caching * CI/CD (GitHub Actions) ready * Deploying the `next-enterprise` application * Deploying the Storybook * Destroying the stack ## Getting started ### Pre-installation checks Make sure you have the `enterprise-cli` installed. [Read more here](/next-enterprise/deployments/enterprise-cli) ### Pre-run environment checks Ensure your current working directory is an actual `next-enterprise` boilerplate, alternatively, read more about `next-enterprise` installation process [here](/next-enterprise#installation) ### GitHub Auth Confirm that you're correctly authenticated with [GitHub CLI](https://cli.github.com/). You can quickly check this by running: ```bash gh auth status ``` If you're not authenticated, you'll be prompted to do so by running: ```bash gh auth login ``` and following the instructions. ### Prepare the AWS Iac & CI/CD ```bash enterprise prepare aws ``` ### Continue interaction with the CLI Follow the instructions displayed in the terminal!. The result of successful `prepare` command should be freshly set up `next-enterprise`-based repository with all the CI/CD configuration and IaC (Terraform) ### Actual deployment Newly created GitHub repository -> Actions -> select one of the workflows *(e.g. Deploy Stack)* -> Run Workflow ## Going forward - production environment The `enterprise-cli` installs a pre-configured **development environment**. To create a **production environment**, follow these steps: 1. **Duplicate the Terraform Configuration** * Copy the contents of the `terraform/dev` folder. * Rename the new folder to `terraform/prod`. 2. **Update Configuration References** * Replace all occurrences of `dev` with `prod`. * Replace all occurrences of `development` with `production`. 3. **Create the Production Environment in GitHub** * Go to your repository:\ **Settings > Environments > New Environment** * Name it `production`. 4. **Add Production Secrets** Under **Settings > Secrets and variables > Actions**, and select the `production` environment, add the following secrets for the **production AWS tenant**: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` 5. **Add Production Environment Variables** Add the following environment variables to the `production` environment: ```bash REDIS_URL=redis://next-enterprise-iac-prod-redis-cluster.example.amazonaws.com:6379 S3_STORYBOOK_BUCKET_NAME=next-enterprise-iac-storybook-prod ``` 6. **Duplicate CI/CD Pipelines** * Copy the GitHub Actions workflows related to infrastructure and Storybook deployment. * Update: * Workflow names and environment references to production * Any file paths or settings that reference `dev` or `development` This ensures the production environment is isolated and configured consistently with your development setup. ## Visualization of the infrastructure file: ./content/docs/next-enterprise/deployments/enterprise-cli.mdx meta: { "title": "Enterprise CLI", "description": "Learn more about the Enterprise CLI, an state-of-the art Next.js deployments assistant for various cloud providers", "icon": "SquareTerminal" } import { Card, Cards } from "fumadocs-ui/components/card"; import { Step, Steps } from "fumadocs-ui/components/steps"; import { Accordions, Accordion } from "fumadocs-ui/components/accordion"; import { Fa6BrandsAws } from "../../../../app/_components/icons/fa6-brands-aws.tsx"; import { Video } from "../../../../app/_components/video.tsx"; ## Introduction Enterprise CLI is a fully open source command-line tool created in Golang with goal to simplify setting up and deploying infrastructure across cloud providers by automating the processes that would require cumbersome manual work.