https://github.com/morven11/full-stack-template
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.
https://github.com/morven11/full-stack-template
cache clean-architecture csharp docker dotnet editorconfig eslint github-actions husky jwt-authentication nextjs papercut pnpm pnpm-workspaces postgresql prettier rbac redis seq typescript
Last synced: 5 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/morven11/full-stack-template
- Owner: MorveN11
- License: mit
- Created: 2025-01-31T14:48:56.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-25T17:30:43.000Z (11 months ago)
- Last Synced: 2025-07-07T07:04:58.077Z (6 months ago)
- Topics: cache, clean-architecture, csharp, docker, dotnet, editorconfig, eslint, github-actions, husky, jwt-authentication, nextjs, papercut, pnpm, pnpm-workspaces, postgresql, prettier, rbac, redis, seq, typescript
- Language: C#
- Homepage:
- Size: 269 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Manuel - Morales | Clean Architecture Full Stack Template
## Tools and Technologies Needed
- [Dotnet 9.0 SDK](https://dotnet.microsoft.com/download)
- [node.js](https://nodejs.org/en/)
- [pnpm](https://pnpm.io/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)
## Package JSON
```json
{
"name": "template",
"version": "1.2.0",
"private": false,
"description": "A Fullstack Template for .NET 9 and Next.js",
"scripts": {
"dev": "pnpm --parallel dev",
"compose": "docker compose up --build -d",
"stage": "docker compose -f 'compose-stage.yaml' up --build -d",
"restore": "pnpm -F=backend restore",
"build": "pnpm --parallel build",
"publish": "pnpm run -F=backend publish",
"migrate:add": "pnpm -F=backend migrate:add",
"ef:install": "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:
```sh
pnpm ef:bundle
```
To execute this in a CI/CD pipeline, only uncomment this:
```yaml
# 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.
```sh
pnpm dev
```
- **compose**: Starts only necessary containers for development like, papercut, redis, postgresql
```sh
pnpm compose
```
- **stage**: Starts the backend and the frontend application with all the necessary containers to test the hole application like in production
```sh
pnpm stage
```
- **restore**: Restores the .NET project dependencies.
```sh
pnpm restore
```
- **build**: Builds the .NET and Next.js project.
```sh
pnpm build
```
- **publish**: Publishes the .NET project.
```sh
pnpm publish
```
- **migrate:add**: Adds a new migration to the .NET project.
```sh
pnpm migrate:add
```
- **ef:install**: Installs the Entity Framework tools.
```sh
pnpm ef:install
```
- **ef:bundle**: Bundles the Entity Framework tools.
```sh
pnpm ef:bundle
```
- **lint**: Lints the frontend project.
```sh
pnpm lint
```
- **format**: Formats the frontend project.
```sh
pnpm format
```
- **prepare**: Sets up Husky for managing Git hooks.
```sh
pnpm prepare
```
## Ports
### Development
- **Frontend**: 3000
- **API**: 5001
- **Swagger**: /swagger/index.html
- **Postgres**: 5432
- **Redis**: 6379
- **Papercut**: 8080
### Staging
- **Frontend**: 80
- **API**: 5001
- **Swagger**: /swagger/index.html
- **Postgres**: 5432
- **Redis**: 6379
- **Papercut**: 8080