Skip to content

vincent-scw/sjz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sjz

sjz stands for 时间轴. It is a practice project for microservices architecture using ASP.NET Core, Angular and Docker.

Functional Services

sjz was decomposed into 3 microservices. All of them are independently deployable applications.

Architecture

User Profile Service

Contains general user information: user account, liked timeline, following users.

Data Storage: neo4j

Method Path Description User authenticated

Timeline Service

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

Image Service

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

Notes

  • 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.

Infrastructure services

Auth Service

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.

Get started locally