Giter Club home page Giter Club logo

admin's Introduction

Components

API

  • dotnet core (API only, no views or anything)
  • ASP.Net Identity
  • IdentityServer4 (so we can do OAuth)
  • ASP.Net identity mongo connector
  • works in a docker container

There is currently just one controller (CategoryController) that has a Get() and a Post() action. The Post() action requires authentication, the Get() does not.

Database

MongoDB, also through docker


I made a docker-compose.yml file which runs these two docker containers. I really like that you can create a docker-compose configuration file, as I easily forget the exact docker run command equivalents.

Basically what needs to be done is:

API

  • we should be able to create a user in the development database and live database. not sure yet how we are going to do that. ASP.NET Identity's UserManager can create a user (I verified that this works) but I do not know yet at which point to create the user (we may do this manually in mongodb)

  • In addition to the existing CategoryController we need a SampleController, through which we can get the gist url's. We should also be able to add gists (and metadata such as name, tags and categories) to this database, through a POST request (authenticated, of course)

  • This API should also have an endpoint equivalent to https://gist-serve.jeroenvinke.nl/files/c2ffde936c8caee5c35b3c08a596b410. This service (currently running on my VPS) serves files from GitHub bypassing:

    • rate limit restrictions
    • incorrect mime types sent by GitHub

Frontend

There is no frontend yet, but an aurelia-cli app will do I think

Database

  • I have not thought about the schema's of Categories and Samples (what do we need to save of a sample in the database)

Run docker containers

  1. docker-compose up to run both the API and the database containers (or docker-compose up database for just the mongodb database)

Sample requests

Get all categories: GET http://localhost:5000/api/category/

Create a category: POST http://localhost:5000/api/category/ body:

{
  "name": "foo"
}

Get OAuth access token in postman: img

admin's People

Contributors

jeroenvinke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.