Skip to content

A boilerplate for .net APIs with Unit tests using moq and autofixture, SwaggerUI, Microsoft Identity and more to come

Notifications You must be signed in to change notification settings

DustSwiffer/AdvancedAPI

Repository files navigation

🎉 Welcome to the .NET API Boilerplate! 🚀

Hey there, fellow coder! 👋

You've just discovered the .NET API Boilerplate, a fantastic starting point for diving into .NET API development. This is not your typical boilerplate it’s designed to be a learning playground packed with features and, yes, a few quirks along the way!

🚀 What's Inside?

Here’s what’s in store with this boilerplate:

🌟 Key Features

  • GitHub Actions: Automate your builds and deployments with ease. Let the CI/CD magic do its thing while you focus on coding. 🛠️✨

  • Unit Tests with AutoFixture and Moq: Write and run unit tests with these powerful tools to ensure your code does what it's supposed to do. Debugging bugs just got a bit easier! 🐞🔍

  • Swagger UI: Showcase and interact with your API endpoints effortlessly. Swagger UI makes your API documentation look sharp and professional. 📜👍

  • Entity Framework Core: Handle your database operations with this ORM framework, simplifying data management and access. 🗃️🔄

  • Microsoft Identity: Secure your API with built-in authentication and authorization mechanisms. Because your data deserves top-notch security. 🔒🚪

  • Well-Structured Architecture:

    • AdvancedAPI: Controllers to manage API requests.
    • AdvancedAPI.Business: Services for your business logic.
    • AdvancedAPI.Data: Models and repositories for data handling.
    • AdvancedAPI.Tests: Unit tests to ensure everything works smoothly.

🚧 Learning by Doing

This boilerplate is designed to be a hands-on learning experience for me. It’s intentionally set up with potential mistakes and quirks to help you learn by doing:

  • Spot a Mistake? Perfect! It’s a great opportunity to dig in and understand what went wrong. Your observations can be valuable for learning.

  • Explore and Experiment: Feel free to modify, break, and fix things. The goal is to learn and grow through exploration.

📦 Getting Started

  1. Clone the Repo: Get your own copy of the project.

  2. Configure the AppSettings: Open appsettings.json and set it up according to your environment. This is where you customize your setup.

  3. Build and Run: Compile and run the project to see it in action.

  4. Check It Out: Visit http://localhost:7242 to view and interact with your API via Swagger UI.

📣 Feedback Welcome! Your feedback is important. If you encounter issues or have suggestions, let me know! This is all part of the learning process, and your insights can help improve the experience for everyone.

Happy coding and enjoy the journey with your new .NET API Boilerplate! 🚀💻✨

P.S. This boilerplate is a work in progress and meant for learning. Embrace the quirks and enjoy exploring!