GithubHelp home page GithubHelp logo

touutae-lab / fastgraduation-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.97 MB

Fast Graduation Backend API Develops with Python Flask API

License: MIT License

Dockerfile 0.16% Python 41.24% JavaScript 16.20% CSS 14.52% HTML 22.13% Jupyter Notebook 5.76%
api-gateway flask flask-restful python3

fastgraduation-api's Introduction

Flask API

fastgraduation-api's People

Contributors

dward2nd avatar holy-wter avatar nickp-real avatar ph0pz avatar touutae-lab avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ph0pz

fastgraduation-api's Issues

Make Login with SuperToken system.

Create Login with Username and Password System implement with Supertoken Framework,
Most of work you can design and implement as you desired.

  • Login system works
  • Handle SSN key

Add pre-commit hooks

Add pre-commit hooks that will automatically run the following dependencies after every commit locally.

Formatter & Linter

  • black
  • isort
  • flake8

Unit Test

  • PyTest

Documentation

  • Sphinx (see #12)

Admin System

The Admin System is an important part that let system moderators manage the overall data and users.

  • User Management
  • Course Information
  • Course Category Information
  • Study Program Information
  • Study Plan Information

API Routes

Instruction

  • One route one file, in either student/ or admin/ directory.
  • Use the Figma prototype as models for the system.

Part Student /student

  • GET /browse_course?q={search text}&init=1 @dward2nd
  • #25 @NMWANNABEAIENGINEER
  • GET/POST /enrollment @dward2nd
    • GET enrolled course list
    • POST edit enrolled course list
  • GET/POST /suggest?init=1 @Touutae-lab
    • GET suggestion based on enrollment alone
      -[deprecated] POST suggestion with modification from a user

Part Admin /admin

student

  • POST /student/add @NMWANNABEAIENGINEER
  • GET /student/browse?q={search text} @NMWANNABEAIENGINEER
  • GET/POST /student/edit/<student_id> @NMWANNABEAIENGINEER
  • GET/POST /student/delete/<student_id> @NMWANNABEAIENGINEER

course

  • POST /course/add
  • GET /course/browse?q={} @NMWANNABEAIENGINEER
  • GET/POST /course/edit/<student_id> @NMWANNABEAIENGINEER
  • GET /course/delete/<student_id>

course category

  • POST /course_category/add @ph0pz
  • GET /course_category/browse?q={} @ph0pz
  • GET/POST /course_category/edit/<category_id> @ph0pz
  • GET /course_category/delete/<category_id> @ph0pz

program

  • POST /program/add @NMWANNABEAIENGINEER
  • GET /program/browse?q={} @NMWANNABEAIENGINEER
  • GET/POST /program/edit/<student_id> @NMWANNABEAIENGINEER
  • GET /program/delete/<student_id> @NMWANNABEAIENGINEER

program plan

  • POST /plan/add @ph0pz
  • GET /plan/browse?q={} @ph0pz
  • GET/POST /plan/edit/<plan_id> @ph0pz
  • GET /plan/delete/<plan_id> @ph0pz

planned timeline for each plan

  • GET /plan_/browse?q={} @ph0pz
  • GET/POST /plan/edit/<student_id> @ph0pz
  • GET /plan/delete/<student_id> @ph0pz
  • อันนี้มันคืออยู่ใน edit ของ program ที่น้ำมนต์ทำไหม

Add a documentation

The following tasks must be finished

  • Documentation website
  • Docs string formating.

Make a plan suggestion system for a particular student

  • Receive the enrollment information from the database and analyse them, then save the suggestion result in the database. (The database schema for suggestions will be added later)

  • Make an API GET route that returns the suggestion result to the frontend. The response may be a JSON object that the web server can understand.

Make sure that

API Routes

Part Student

  • GET /api/student/browse_course

Assignee: add yourself here

Description: This route sends a list of available courses to users. This route corresponds to the Search page.

Search

Params:

  • q=[keywords to search] (optional): a query text that a user may input in the search box.
  • init=1 (optional): a flag whether should we return a predefined list of courses regardless of the enrolled courses. This param must come with the exact value 1, or it would get rejected as if such the param had not been sent.

Response:

  • If there are no params, use the user's list of enrolled courses to determine the order of courses to respond to; the most recommended — important — course comes first.
  • If q exists, respond with the order based on relevance instead — without using the user's enrolled courses to determine the order. However, the student's
  • If init=1 exists, use the predefined plan — the exact same as the ones written by the department of CS. init will ignore any other params, especially q if we provide one. This param must come with the exact value 1, or it would get rejected as if such the param had not been sent.

Response Format

{
    "status": 200,
    "msg": "OK",
    "data": [
        {
            "course_id": [string of 6-digit course ID],
            "course_name_th": [string of course name in Thai],
            "course_name_en": [string of course name in English],
            "possible_category": [
                {
                    "cat_id": [integer id of the category],
                    "cat_name_th": [category name in Thai],
                    "cat_name_en": [category name in English],
                    "cat_abbr_th": [abbreviated name in Thai],
                    "cat_abbr_en": [abbreviated name in English]
                },
                // ...
            ]
        },
        // ...
    ]
}

Note: params are pairs of a key and a value appending at the end of URLs following the ? symbol. For instance,

http://localhost:8000/myroute?a=5&b=2

has 2 params: a with value 5, and b with value 2.

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.