.NET Core Web API! This project is designed to help you practice and learn the fundamentals of creating a Web API using .NET Core. It's built for educational purposes and includes essential features like user authentication, data validation, and CRUD operations for managing data.
The TechStore Web API project is designed to simulate a store backend. It supports functionality to manage user accounts, products, and orders. You’ll find standard RESTful practices implemented along with an emphasis on clean code and maintainable structure.
- 🔐 Authentication & Authorization: Secure access using JWT.
- 📄 CRUD Operations: For managing resources like users, products, and orders.
- 📈 Data Validation: Ensures input data consistency and security.
- 📝 Logging: Built-in logging for better debugging and maintenance.
- 📂 Modular Architecture: Designed to be extendable and easy to maintain.
- .NET SDK (version 5.0 or higher)
- SQL Server or MySQL for database
- Postman (optional, for testing API endpoints)
-
Clone the repository:
git clone https://github.com/Zainulabdeenoffical/.net-core-web-api-Restful-api-.git cd .net-core-web-api-Restful-api-
-
Install dependencies:
dotnet restore
-
Configure the Database:
- Set up a local database and update the connection string in
appsettings.json
.
- Set up a local database and update the connection string in
-
Run the API:
dotnet run
-
The API will be accessible at
http://localhost:5000
.
Endpoint | Method | Description |
---|---|---|
/api/auth/login |
POST | Login a user |
/api/auth/signup |
POST | Register a new user |
/api/products |
GET | Retrieve all products |
/api/products |
POST | Add a new product |
/api/orders |
GET | Get all orders |
To generate API documentation and make it easier to explore the API endpoints, Swagger is integrated into the project. You can learn more about setting up Swagger for ASP.NET Core by following Microsoft’s tutorial on Web API help pages with Swagger.
To access the Swagger UI, open your browser and go to http://localhost:5000/swagger
after running the API. This will provide a detailed, interactive interface to test the API endpoints.
- ASP.NET Core 5.0 - Web API framework
- Entity Framework Core - ORM for database management
- SQL Server / MySQL - Database management system
- JWT Authentication - Secure authentication
- Fork the repository.
- Create a branch for any feature or bug fixes.
- Commit your changes.
- Push to your fork and submit a pull request.
Contributions, issues, and feature requests are welcome! 💡
This project is licensed under the MIT License - see the LICENSE file for details.
- Author: M Zain Ul Abideen
- GitHub: Zainulabdeenoffical
- Email: [email protected]
🌟 If you like this project, please give it a star! 🌟