Giter Site home page Giter Site logo

online_course_platform's Introduction

Online Course Platform

Demo

  • Web-Based tool for admin to manage online courses
  • Grape API
    • For user to view online courses
    • For user to purchase online courses
    • For user to view user courses

Requirement

  • ruby 2.6.3
  • rails 5.2.3
  • postgres

Update configuration files

setup .env file (or .env.development), refer to the example file at .env.example

Install Gem and Setup Database

bundle install
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec yarn install

Run the server

Just run the rails command to start the server

bundle exec rails s

Then visit http://localhost:3000

Testing

bundle exec rspec

Try it! ๐Ÿ”ฅ๐Ÿ”ฅ

     POST  |  /api/:version/authentications/token(.json)  |  v1  |  Authenticate user and retrieve authentication token
      GET  |  /api/:version/courses(.json)                |  v1  |  Return list of courses for sale                    
      GET  |  /api/:version/courses/:id(.json)            |  v1  |  Return a specific course for sale                  
     POST  |  /api/:version/courses/purchase(.json)       |  v1  |  Purchase a course and return purchase record       
      GET  |  /api/:version/user_courses(.json)           |  v1  |  Return list of user courses                        
      GET  |  /api/:version/user_courses/:id(.json)       |  v1  |  Return a specific user course 

Method 1

If you use Postman, that's perfert! ๐Ÿ‘ Download and import the API collections.

Method 2

use curl


โ—๏ธAssuming that you already signed up with you emailโ—๏ธ

Use you API token for authorization.

Get it with โžก๏ธ POST /api/v1/authentications/token?email={your_email}&password:{your_passord}

You can use test user to try!

email: [email protected]
password: secretsecret

You need to add { api_token: your_api_token } in params for other APIs to authenticate.

Author

online_course_platform's People

Contributors

dependabot[bot] avatar rongrongteng avatar

Stargazers

 avatar

Watchers

 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.