Skip to content

A production-ready full-stack template featuring a Clean Architecture backend with CQRS, RBAC, and JWT Authentication, paired with a modern Next.js frontend. Built for scalability, security, and maintainability, this template provides a seamless development experience with Docker support for containerization.

License

Notifications You must be signed in to change notification settings

MorveN11/full-stack-template

Repository files navigation

Manuel - Morales | Clean Architecture Full Stack Template

Tools and Technologies Needed

Package JSON

{
  "name": "template",
  "version": "1.2.0",
  "private": false,
  "description": "A Fullstack Template for .NET 9 and Next.js",
  "scripts": {
    "dev": "pnpm --parallel dev",
    "restore": "pnpm -F=backend restore",
    "build": "pnpm --parallel build",
    "publish": "pnpm run -F=backend publish",
    "migrate:add": "pnpm -F=backend migrate:add",
    "ef:insatll": "pnpm -F=backend ef:install",
    "ef:bundle": "pnpm -F=backend ef:bundle",
    "lint": "pnpm -F=frontend lint",
    "format": "pnpm -F=frontend format",
    "prepare": "husky"
  },
  "devDependencies": {
    "@commitlint/cli": "^19.5.0",
    "@semantic-release/changelog": "^6.0.3",
    "@semantic-release/commit-analyzer": "^12.0.0",
    "@semantic-release/git": "^10.0.1",
    "@semantic-release/github": "^10.0.5",
    "@semantic-release/npm": "^12.0.1",
    "@semantic-release/release-notes-generator": "^13.0.0",
    "commitizen": "^4.3.1",
    "cz-conventional-changelog": "^3.3.0",
    "husky": "^9.1.6",
    "semantic-release": "^23.1.1"
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  }
}

Update the version of the API in the package.json file to 0.1.0. to reset the version of the API. Update the description of the API in the package.json with your own description. Update any other fields in the package.json file as needed.

Remove CHANGELOG.md file to reset the changelog record.

Remove LICENSE file to reset the license, use your own license.

Set Production Migrations

For production, you can use the ef:bundle command to bundle the migrations into a single migration. This will allow you to deploy the application with a single migration file. To execute the command, run the following:

pnpm ef:bundle

To execute this in a CI/CD pipeline, only uncomment this:

# TODO: If you are going to Deploy your API, you can run the migrations here for your production database
# Only you need to add the connection string to your secrets
# - name: Run EF Migrations
#   run: ./efbundle --connection "${{ secrets.DB_CONNECTION_STRING }}"

In the .github/workflows/release.yml file, uncomment the section that runs the migrations and set you DB_CONNECTION_STRING in your GitHub Secrets.

Scripts

  • dev: Starts frontend and backend in Development Configuration.

    pnpm dev
  • restore: Restores the .NET project dependencies.

    pnpm restore
  • build: Builds the .NET and Next.js project.

    pnpm build
  • publish: Publishes the .NET project.

    pnpm publish
  • migrate:add: Adds a new migration to the .NET project.

    pnpm migrate:add <MigrationName>
  • ef:install: Installs the Entity Framework tools.

    pnpm ef:install
  • ef:bundle: Bundles the Entity Framework tools.

    pnpm ef:bundle
  • lint: Lints the frontend project.

    pnpm lint
  • format: Formats the frontend project.

    pnpm format
  • prepare: Sets up Husky for managing Git hooks.

    pnpm prepare

Ports - localhost

  • Frontend: 3000
  • API: 5001
    • Swagger: /swagger/index.html
  • Postgres: 5432
  • Redis: 6379
  • Papercut: 8080
  • Seq: 8081

About

A production-ready full-stack template featuring a Clean Architecture backend with CQRS, RBAC, and JWT Authentication, paired with a modern Next.js frontend. Built for scalability, security, and maintainability, this template provides a seamless development experience with Docker support for containerization.

Topics

Resources

License

Stars

Watchers

Forks