Skip to content

Juxn89/net-core-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservices with ASP.NET Core | Angular | MongoDB | Docker 🚀

.NET Angular MongoDB SQL Server Docker Udemy Course


📚 About This Project

This repository is part of the Udemy course on building microservices with ASP.NET Core, Angular, MongoDB, and Docker.
It demonstrates a modern microservices architecture with:

  • API Gateway
  • Security Microservice (Authentication & Authorization, SQL Server)
  • Library Microservice (Book management, MongoDB)
  • Angular Client (Frontend SPA)

🏗️ Architecture

Microservices Architecture


🛠️ Technologies Used

  • Backend: ASP.NET Core 8, MediatR, AutoMapper, FluentValidation, JWT, Entity Framework Core
  • Frontend: Angular 19, Angular Material, RxJS, Flex Layout
  • Databases: SQL Server (Security), MongoDB (Library)
  • API Gateway: Ocelot (or your implementation)
  • Containerization: Docker, Docker Compose

⚡ Quick Start

1. Prerequisites

2. Clone the Repository

3. Configure User Secrets for JWT Authentication 🔑

Some backend microservices require a secret key for JWT authentication.
You must set the Jwt:Key secret before running these services locally.

For each microservice that requires it (e.g., Security, Gateway), run:

dotnet user-secrets set "Jwt:Key" "YourSuperSecretKey" --project <PathToProjectFile>

Replace <PathToProjectFile> with the path to the .csproj file of the microservice.

4. Navigate to Client Folder

Run the following command in your terminal:

cd client

5. Install Angular Dependencies

Ensure you're in the client directory and run:

npm install

6. Update Environment Variables

Create a .env file in the client directory based on the provided .env.example. Update values as necessary.

7. Run the Application

To start the Angular frontend, use:

ng serve

Visit http://localhost:4200 in your browser.


🌐 Backend Endpoints

  • Security Microservice: Handles authentication, user management, JWT issuance.
  • Library Microservice: Manages books and related data.
  • API Gateway: Routes requests to the appropriate microservice.

For detailed API endpoints, refer to the Swagger UI at each service's /swagger endpoint.


📦 Angular Client Dependencies

Key dependencies from package.json:

  • @angular/core, @angular/material, @angular/flex-layout, rxjs, express, etc.

📖 Further Resources


🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first.


🏆 License

This project is for educational purposes as part of the Udemy course.


Enjoy building microservices! 🚀

Replace "YourSuperSecretKey" with a strong, unique value.

Repeat these steps for any other microservice (such as the API Gateway) that uses JWT authentication and expects a Jwt:Key in its configuration.

About

Parte del curso de Microservicios con ASP.NET Core | Angular | MongoDB | Docker de Udemy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published