Platform (Websocket API) built on C# (mono), can be used as separate microservice or as monolith
I'm just a junior developer, keep that in mind if you want to use this platform, or help me improve it, thanks! :). I see this platform as base / boilerplate for my side projects back end with needed features out of the box.
Want to contribute? Great!
Code reviews / any fixes / refactorings or improvements will be much appreciated, thanks :)
- a bit modified MVC pattern Controllers are used for
- handling requests & middleware
- all request logic moved into separate classes
- custom request types & error codes
- Using as monolith or as microservice (check microservice module)
- Model transformers (check UserTransformer)
- Migrations
-
currenlty only postgresql db is supported but adding support for mysql should be pretty easy
-
Setup instructions:
-
- Install composer
-
- install postgresql & create database
-
- Run composer install in /migrations folder
-
- Copy & edit phinx.yml (/migrations)
-
- In the migrations folder run: vendor/bin/phinx migrate -e development
-
- copy App.config.example to App.config than edit
-
! for unit tests you will also need to configure App.config inside UnitTests project folder
- DB Migrations: Phinx (migrations / PHP)
- Models: Dapper (object mapper for .Net)
- Websockets: WebsocketSharp
- Newtonsoft.JSON
- add your request category (ex. Auth) to RequestProcessor (Scripts/Core)
- all requests ex. Login should have unique enum in RequestTypes (Core/RequestTypes)
- connect your controller via Process() function which should return RequestResponse
- in your controller add middleware (if needed) then pass your request parameters to ControllerLogic classes
- in Logic classes handle your request and then return RequestResponse (example: auth requests logic)
- crypto API's manager -> checking wallet balances & transactions (Eth, Dash, BTC, LTC)
- ...
- getting started info
- redis client for caching
- debug mode
- ...