A comprehensive API backend for managing code assets, projects, companies, users, and their associated data within an organization. API allows to create a start project from a project desctiption by finding relevant code assets using OpenAI's models.
- CRUD operations for code assets, folders, and code files with filtering and pagination support.
- Manage companies including creation, retrieving user's company info, and user management within companies.
- User authentication and authorization with roles such as Admin and Enterprise.
- Token-based authentication with refresh tokens support.
- Email verification, password reset, and secure account management.
- Manage tags with popular tags listing and search capabilities.
- Start Projects creation based on textual project prompts with AI-assisted selection of relevant code assets.
- Compile .NET project code remotely using a compilation API integration.
- C# and .NET 8.0 Web API framework
- Cosmos DB as primary database service
- Gmail SMTP for sending emails
- OpenAI API: gpt-4o-mini, gpt-4.1-nano
- .NET SDK 8.0
- Cosmos DB instance
- SMTP service credentials (Gmail SMTP recommended)
# Clone repository
git clone https://github.com/Shchoholiev/assets-manager-api.git
cd assets-manager-api
# Restore dependencies and build solution
dotnet restore
dotnet build
# Run the API (development environment)
dotnet run --project AssetsManagerApi.Api
# The API will be available at http://localhost:5052 (default)
# Optionally, use Swagger UI at /swagger to explore endpoints.
The application supports multiple environment configurations with appsettings.json
files:
appsettings.Development.json
for local developmentappsettings.Production.json
for production environmentappsettings.Test.json
for testing environment
-
CosmosDb
DatabaseName
: Name of the Cosmos DB database instance.
-
EmailSettings
VerificationUrl
: URL for email verification links.PasswordResetUrl
: URL for reset password links.
-
OpenAi
BaseUrl
: Base URL for OpenAI API integration (if used for any AI-powered features).
-
JsonWebTokenKeys (for JWT Auth)
ValidIssuer
ValidAudience
- Validation flags for issuer, audience, lifetime, signing keys.
-
Smtp (for email)
Host
: SMTP host (e.g., smtp.gmail.com)Port
: SMTP port (e.g., 587)Username
: Username for the SMTP server
-
CompilationApis
DotNetCompilationUrl
: URL endpoint for remote .NET project compilation service.
You may override configuration via environment variables or JSON config files, e.g.:
ASPNETCORE_ENVIRONMENT
to specify the environment (Development, Production, Test)- SMTP credentials and JWT secrets should be secured and injected appropriately
Default: dotnet test
With logs: dotnet test --logger "console;verbosity=detailed"
Single file with logs: dotnet test --filter "FullyQualifiedName~StartProjectsControllerTests" --logger "console;verbosity=detailed"
Single test with logs: dotnet test --filter FullyQualifiedName=AssetsManagerApi.IntegrationTests.Tests.StartProjectsControllerTests.CreateStartProject_ValidInput_ReturnsAssets --logger "console;verbosity=detailed"