Creating a New Project
Chapi uses a template-based approach to scaffold new .NET projects with Clean Architecture.Open Project Creation
Navigate to the project creation dialog in Chapi Assistant or use the AI Assistant to create a project.
Configure Project Details
Provide the following information:
- Project Name: The name of your project (e.g.,
MyApiProject) - Parent Directory: Where the project will be created (e.g.,
C:\Projects) - Template URL: Git repository URL for the template (default: Clean Architecture)
- Remote URL (optional): Your remote Git repository URL
Project Creation Process
Chapi Assistant performs the following steps automatically:
- Clone the template repository
- Remove original Git metadata (.git folder)
- Rename project structure to match your project name
- Initialize new Git repository
- Add remote origin (if provided)
- Register project in Chapi workspace
Cloning an Existing Repository
You can also clone existing repositories into your Chapi workspace.Project Templates
Chapi supports different architectural patterns based on the template structure:- Ardalis Clean Architecture
- Classic Clean Architecture
Projects with Endpoints folder use Ardalis-style architecture:
- API layer uses
Endpointsinstead ofControllers - Generic repository pattern
- Dependency injection via Scrutor auto-discovery
- Minimal API endpoints
API/Endpoints folderCode Implementation
The project creation logic is implemented inCreateProjectUseCase.cs:
Managing Projects
Add Existing Project
Add a project that wasn’t created by Chapi:List Projects
View all registered projects:Remove Project
Remove a project from Chapi workspace (doesn’t delete files):Default Template
Chapi uses the following default template for .NET projects:- Clean Architecture structure
- Dependency Injection setup
- Entity Framework Core integration
- CQRS pattern support
- Repository pattern implementation
Best Practices
Choose the right parent directory
Choose the right parent directory
- Use a dedicated workspace folder (e.g.,
C:\Projects) - Avoid deeply nested paths
- Ensure you have write permissions
Project naming conventions
Project naming conventions
- Use PascalCase (e.g.,
MyApiProject) - Avoid special characters and spaces
- Choose descriptive names
Set up remote repository
Set up remote repository
- Create the remote repository first (GitHub/GitLab)
- Provide the SSH or HTTPS URL during creation
- Chapi will configure the remote automatically
Verify after creation
Verify after creation
- Check that all folders are renamed correctly
- Verify Git initialization:
git status - Ensure dependencies resolve:
dotnet restore
Troubleshooting
After creating a project, Chapi automatically switches to it, loading all Git metadata and project context for the AI Assistant.
Next Steps
Generate Modules
Learn how to scaffold new modules using Chapi’s code generation
Git Workflow
Master Git operations within Chapi Assistant