Skip to content

gitcomteam/gitcom-api

Repository files navigation

GitCom API

CircleCI status chat on Discord GitCom link

Description:

This is the main API of the GitCom platform available at api.gitcom.org

Tech stack: 🛠️

Project is built using .NET Core and it's based on Micron framework

Database: PostgreSQL
ORM: Dapper
Migrations: Phinx
Webserver: NancyFX

API Documentation

Check out swagger.json file inside repo or view it here: swagger preview

Requirements:

  1. .NET Core 2.2
  2. composer (PHP dependency manager) - used for migrations

Directory structure (App project):

  1. AL stands for Application layer - contains classes like Controllers, Utility classes (basically all business logic)
  2. DL stands for Data layer - contains models, repositories, custom class bindings etc.
  3. PL stands for Presentation layer - contains transformers and everything related to data processing / presentation

Set up to develop locally:

  1. restore nuget packages

  2. build project

  3. copy config.example.json into:
    For main app
    App/bin/Debug/netcoreapp2.2/config/config.json
    For unit tests
    Tests/bin/Debug/netcoreapp2.2/config/config.json

  4. edit config files - fill database name / user / etc.

  5. copy migrations/phinx.example.yml to migrations/phinx.yml

  6. edit phinx.yml - fill database user / password etc.

  7. install php & composer dependencies from migrations/composer.json via composer install

  8. run migrations (in migrations folder):

php vendor/bin/phinx migrate - to migrate with default database (development)

php vendor/bin/phinx migrate -e testing - to migrate with test database (used for testing)

  1. build and run App.dll inside App/bin/Debug/netcoreapp2.2/bin

Contribution:

Thank you for considering contributing to this repo, feel free to open a PR with any improvement, feature or bugfix.
All pull requests should go into dev branch

Contribution rewards

For each merged PR you will be rewarded with contributor badge and 2500 (or more) GitCom tokens which are tradeable on Waves Decentralized exchange (You will need to have a Waves wallet to be able to receive tokens)