sjz stands for 时间轴. It is a practice project for microservices architecture using ASP.NET Core, Angular and Docker.
sjz was decomposed into 3 microservices. All of them are independently deployable applications.
Contains general user information: user account, liked timeline, following users.
Data Storage: neo4j
Method | Path | Description | User authenticated |
---|
Perform actions on Timelines.
Data Storage: Mongodb
Method | Path | Description | User authenticated |
---|---|---|---|
GET | /timelines | Query timelines | × |
GET | /timelines/{id} | Get a specific timeline | × |
POST | /timelines | Insert/Update a specific timeline | |
DELETE | /timelines/{id} | Delete a specific timeline | |
POST | /timelines/{id}/records | Insert/Update a specific record in timeline | |
DELETE | /timelines/{id}/records/{recordId} | Delete a timeline record |
Upload or list images to Azure Blob Storage.
Data Storage: Azure Blob Storage
Method | Path | Description | User authenticated |
---|---|---|---|
GET | /images | List images | × |
POST/PUT | /images/upload | Upload image |
- Each microservice has its own database (Azure Blob storage for Image Service).
- In different service, I use different database to meet the scenarios. For example, graph database neo4j is used in User Profile Service, because graph database is more suitable to handle user-to-user relationships.
The project leverages IdentityServer4 and provides OAuth2 and OpenID authentication.
To make life simple, I only allow External login (Github & Linkedin). I use Authorization Code with PKCE
grant type for users authorization,
and Client Credentials
grant for microservices authorization.
- Use docker-compose:
docker-compose up
- Visit http://localhost:4200