Ready-to-Deploy Microservices
Generated with QuickCode.Net • Deployed on Google Cloud Run • CI/CD with GitHub Actions • Containerized with Docker • Event-driven with Kafka • Monitored with Elasticsearch & Kibana
Design, Visualize, Code, Deploy
- About the Solution
- Technologies & Stack
- Solution & Module Structure
- Setup & Run
- Running Tests
- CI/CD & Cloud Run Deployment
- Developer Notes & Extras
- FAQ
- Contact
- Docker Desktop (or Docker Engine) is installed and running
Download Docker Desktop - .NET 9 SDK is installed
Download .NET 9 SDK - Git is installed
Download Git
-
Open a terminal and run:
git clone https://github.com/QuickCodeNet/demo.git
cd demo
- If required, copy
.env.example
to.env
and fill in any necessary secrets or API keys
(If.env.example
does not exist, check the README or ask the project owner for required environment variables.)
- Start all services with Docker:
- On macOS/Linux:
docker compose up --build
- On Windows:
docker-compose up --build
- On macOS/Linux:
- Wait until all containers are up and healthy (check terminal output for errors).
- Open your browser and go to:
- Portal: http://localhost:6020
- Gateway: http://localhost:6060
- Log in to the Portal using demo credentials (if provided):
- Username: demo@quickcode.net
- Password: String1!
- In a new terminal, run all tests:
dotnet test QuickCode.Demo.Docker.sln
- Generate a code coverage report:
./run-coverage-report.sh
- Open
coverage-report/index.html
in your browser to review the results.
- Visit the Gateway Dashboard and check available modules and health checks.
- In the Portal, try user, role, permission, and workflow management features.
- Review logs and monitoring dashboards (Kibana, Elastic) if available.
- Create a new branch for your feature or bugfix:
git checkout -b feature/my-feature
- Make your changes, commit, and push:
git add . git commit -m "Describe your changes" git push origin feature/my-feature
- Open a Pull Request on GitHub.
- Check GitHub Actions for automated build and deployment status.
- Review Cloud Run deployment logs if you have access.
Demo is a modular, enterprise-grade .NET solution generated by quickcode.net.
It is designed for scalable, maintainable, and testable microservice architectures, supporting Docker, CI/CD, and Google Cloud Run deployment.
- .NET 9 (C#)
- Entity Framework Core
- PostgreSQL / SQL Server / MySQL Support
- Docker & Docker Compose
- Google Cloud Run
- GitHub Actions (CI/CD)
- Custom mediator for CQRS
- Swagger/OpenAPI
- Serilog, HealthChecks, etc.
demo/
src/
Common/
Modules/
.../
other modules
.../
UserManagerModule/
Presentation/
QuickCode.Demo.Gateway/
QuickCode.Demo.Portal/
Services/
...
docker-compose.yml
README.md
- UserManagerModule: User, role, and permission management.
- Gateway: API gateway and reverse proxy.
- Portal: Web frontend (MVC/Razor).
QuickCode projects include ready-to-use management dashboards for both Gateway and Portal:
-
Gateway Dashboard:
- Central entry point for all APIs and modules
- Health checks, Swagger Map, config management, and quick links to Portal, Kibana, Kafdrop, and GitHub
- Your project: e.g. https://demo-gateway.quickcode.net
-
Portal Dashboard:
- Admin interface for managing all tables, users, roles, permissions, and workflows
- Secure login, user management, and event/workflow configuration
- Demo user credentials:
- Username : demo@quickcode.net
- Password : String1!
- Your project: e.g. https://demo-portal.quickcode.net
These dashboards are automatically deployed and available for every generated project, providing a unified and professional management experience out of the box.
All services and modules are deployed to Google Cloud Run and exposed via user-friendly, corporate domains ending with .quickcode.net
for a seamless and professional experience.
- Gateway:
- Portal:
- Module APIs:
- The Gateway automatically routes requests to the correct module API based on the path and host.
- Swagger, health check, and module API endpoints are all mapped and accessible via the Gateway domain.
- All routing and cluster configuration is managed for you; see the sample below:
{
"Routes": {
"user-manager-module": {
"Match": {
"Hosts": ["demo-gateway.quickcode.net"],
"Path": "api/user-manager-module/{**catch-all}"
},
"ClusterId": "user-manager-module-api"
}
},
"Clusters": {
"user-manager-module-api": {
"Destinations": {
"destination1": {
"Address": "https://demo-user-manager-module.quickcode.net"
}
}
}
}
}
This ensures all APIs and dashboards are accessible via clean, memorable URLs, both in demo and production environments.
- API Call Tracking: Every API call passing through the Gateway is monitored and logged
- Predefined Topics: Kafka integration with predefined topics for different types of API calls
- Real-time Monitoring: Track API performance, usage patterns, and system health
- Event Streaming: All API events are streamed to Kafka for real-time processing
- YAML-based Workflow Definition: Create custom workflows using simple YAML configuration
- Endpoint Integration: Workflows can trigger API calls to any endpoint
- Topic-based Processing: Workflows can subscribe to Kafka topics and process events
- Dynamic Execution: Workflows can be modified and deployed without code changes
- Endpoint-Level Permissions: Configure access control for each API endpoint based on user groups
- Portal Page Management: Granular control over portal pages and CRUD operations per user group
- Dynamic Authorization: Real-time permission updates without system restart
- Audit Trail: Complete logging of all permission changes and access attempts
- Gateway Management: Configure API routes, permissions, and monitoring settings
- Portal Management: Manage user groups, page access, and CRUD permissions
- Workflow Management: Create, edit, and monitor custom workflows
- Kafka Topic Management: Monitor and configure Kafka topics and event processing
These features provide enterprise-level control and monitoring capabilities, making the system suitable for large-scale deployments with complex permission requirements.
On macOS and Linux:
docker compose up --build
On Windows (or older Docker installations):
docker-compose up --build
Access the services:
- Portal: http://localhost:6020
- Gateway: http://localhost:6060
Note: For detailed step-by-step instructions, see the Onboarding Checklist above.
- You can run individual modules locally using Visual Studio or
dotnet run
. - Make sure required environment variables and connection strings are set (see Environment Variables & Secrets).
-
Unit & Integration Tests:
dotnet test QuickCode.Demo.docker.sln
-
Code Coverage:
./run-coverage-report.sh
Coverage reports are generated in the
coverage-report/
directory.Note: The coverage script:
- Excludes DTOs from coverage (
[*.Dtos]*
) - Excludes Common, Portal, and Gateway projects from coverage
- Generates HTML reports in
coverage-report/index.html
- Excludes DTOs from coverage (
Ready-to-use Postman collections are provided for all modules in this project. This enables you to quickly test and explore every API endpoint.
-
Import All Collections:
- In Postman, click Import and select all JSON files from the
src/postman_files
directory. - You will see collections for the User Manager API and other modules (such as Email Manager Module, Sms Manager Module , etc.).
- In Postman, click Import and select all JSON files from the
-
Authentication Flow:
- Each collection contains an Authentication folder with a
Login
request. - Run the
Login
request first.- The test script in this request will automatically save the
access_token
(ortoken
) to your Postman environment.
- The test script in this request will automatically save the
- Each collection contains an Authentication folder with a
-
Environment Setup:
- Make sure you have a Postman environment with a
token
variable (it will be set automatically after login). - Optionally, set a
baseUrl
variable if your API base URL is different from the default.
- Make sure you have a Postman environment with a
-
Test Any Endpoint:
- After logging in, you can immediately test any endpoint in any collection.
- All requests use the token automatically via the
Authorization: Bearer {{token}}
header.
- Import all collections from
src/postman_files
. - Select or create a Postman environment.
- Run the
Login
request in theAuthentication
folder of the User Manager API or any other module. - The token is saved to the environment.
- You can now use all other endpoints in all collections without manually copying tokens.
- All collections are automatically generated from the latest Swagger/OpenAPI definitions, ensuring they are always up to date.
- If your token expires or you get a 401 error, simply re-run the
login
request to refresh your token.
This setup makes onboarding, testing, and integration with your APIs fast and reliable for all developers and partners.
- GitHub Actions is used for CI/CD.
- On every push or pull request, tests and builds are run automatically.
- On merge to
main
, Docker images are built and pushed to Google Container Registry. - Automatic deployment to Google Cloud Run is triggered after a successful build.
- All secrets and environment variables are managed via GitHub Secrets and GCP environment variables.
Example Workflow:
- Developer pushes code to GitHub.
- GitHub Actions runs tests, builds, and coverage.
- If on
main
, Docker images are built and pushed. - Cloud Run is updated with the new image.
- Health checks and notifications are performed.
- All sensitive data (connection strings, API keys) are managed via environment variables.
- Never commit secrets to the repository.
- For local development, use a
.env
file (excluded from git).
- Follows Clean Architecture and SOLID principles.
- Uses CQRS, repository, and dependency injection patterns.
- Linting, analyzers, and code coverage are integrated.
- Fork the repository and create a feature branch.
- Write tests for your changes.
- Open a pull request with a clear description.
Q: How do I add a new module?
A: Go to quickcode.net, enter your project secret, and regenerate your project. The new module will be included in the updated codebase.
Q: How do I update secrets?
A: If you are the project owner on GitHub, you can add secrets there. Otherwise, all secrets are managed by quickcode.net.
Q: How do I troubleshoot a failing service?
A: Check logs with docker-compose logs <service>
, and review health check endpoints.
Project Owner: Üzeyir Apaydın
- LinkedIn: linkedin.com/in/uzeyirapaydin
- GitHub: github.com/uzeyirapaydin or github.com/QuickCodeNet
- Email: uzeyir@quickcode.net
For enterprise solutions, collaboration, or technical discussions, please reach out.
Feel free to reach out or open an issue for further questions!