Chai API is a .NET Web API project that provides a robust backend service for user account management and location-based data handling. It follows a clean architecture pattern with separate layers for API, Data Services, and Models. It was originally intended as bootstrap system for building remittance system.
The solution consists of three main projects:
- Chai.API: The Web API layer handling HTTP requests and responses
- CHAI.DataService: Data access layer with repositories and database context
- Chai.Models: Domain models, DTOs, and contracts
- User Account Management (registration, authentication)
- JWT-based Authentication
- Location Management (Countries, States, Cities)
- Gender and App Configuration Management
- Password Recovery System
- Swagger API Documentation
- Exception Handling and Logging
- Input Validation
- AutoMapper for Object Mapping
- ASP.NET Web API 2
- Entity Framework
- Unity for Dependency Injection
- JWT for Authentication
- Swagger/Swashbuckle for API Documentation
- AutoMapper
- Newtonsoft.Json
- Visual Studio 2017 or later
- .NET Framework 4.5 or later
- SQL Server (version compatible with Entity Framework)
- Clone the repository
- Open the solution in Visual Studio
- Restore NuGet packages
- Update the connection string in
Web.config - Build the solution
- Run the application
Once the application is running, you can access the Swagger documentation at:
http://localhost:[port]/swagger
- Controllers for handling HTTP requests
- JWT configuration and validation
- Exception handling and logging
- Model validation filters
- Custom response handlers
- Generic repository pattern implementation
- Database context and configurations
- Data access logic
- CRUD operations
- POCO classes for domain entities
- Data Transfer Objects (DTOs)
- Interface contracts
- Data annotations for validation
The API provides the following main endpoints:
/api/Account- User account management/api/AppConfig- Application configuration/api/City- City management/api/Country- Country management/api/State- State management/api/Gender- Gender types/api/Password- Password recovery
- JWT-based authentication
- Password complexity requirements
- Input validation and sanitization
- Exception handling and logging
- Token validation middleware
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.