QR code-based attendance tracking for youth centers.
Visus is a full-stack application built with .NET 9 Aspire and React. It provides QR code-based attendance tracking for youth centers, allowing for efficient management of participant attendance.
- .NET 9: C# backend with Aspire for cloud-native application development
- PostgreSQL: Database for persistent storage
- Entity Framework Core: ORM for database operations
- ASP.NET Identity: Authentication and authorization
- JWT: Token-based authentication
- Swagger: API documentation
- React 19: Frontend UI library
- Webpack: Frontend build tool
- Docker: Containerization for deployment
The solution consists of multiple projects:
- visus.ApiService: Backend API service with auth endpoints
- visus.AppHost: Aspire project orchestrator
- visus.Data: Data access layer and identity models
- visus.Frontend: React frontend
- visus.MigrationService: Database migration service
- visus.Models: Shared models and DTOs
- visus.ServiceDefaults: Shared service configuration
- visus.Tests: Test project
- .NET 9 SDK
- Node.js (version 20.12 or later)
- Docker for running PostgreSQL and containerized applications
Follow these steps to get the application running locally:
git clone https://github.com/canyonhhh/visus
cd visus
Set up JWT secrets for development:
dotnet user-secrets init --project visus.ApiService
dotnet user-secrets set "JWT:Secret" "YourDevelopmentSecretKey1234567890123456789012" --project visus.ApiService
dotnet user-secrets set "JWT:ValidIssuer" "https://localhost" --project visus.ApiService
dotnet user-secrets set "JWT:ValidAudience" "https://localhost" --project visus.ApiService
dotnet user-secrets set "JWT:ExpirationInDays" "7" --project visus.ApiService
Navigate to the frontend directory and install dependencies:
cd visus.Frontend
npm install
The application is designed to run with .NET Aspire, which coordinates all services, including:
- PostgreSQL database
- API service
- Migration service
- Frontend application
From the root directory, run:
dotnet run --project visus.AppHost
This command will:
- Start the PostgreSQL container
- Apply database migrations
- Start the API service
- Build and run the frontend
The Aspire dashboard will open in your browser, showing the status of all services. You can access the frontend application and API from there.
Migrations are handled automatically by the MigrationService when running with Aspire.
To manually create a new migration after modifying entity models:
dotnet ef migrations add <MigrationName> --project visus.Data --startup-project visus.MigrationService
When adding ASP.NET Identity or making significant schema changes, you may need to create a fresh migration:
# Remove existing migrations (if starting over)
dotnet ef migrations remove --project visus.Data
# Add new migration
dotnet ef migrations add InitialCreate --project visus.Data
Run the tests using:
dotnet test
The project includes Git hooks for code formatting:
- Pre-commit hook: Runs
dotnet format
to ensure consistent code style
To install Husky:
dotnet tool restore