Coder Social home page Coder Social logo

ts-system's Introduction

Tutor-Student System (ts-system)

Demo Application for tutors that need a system where they can manage their students

Design Points

A combo of two npm projects, the backend server and the frontend UI. So there are two package.json configs and thereforce two places to run npm commands:

  1. Node/Express.js Backend: backend/package.json
  2. Next.js Client: client/package.json
    • generated by Next.js
    • deployed via build script in the Node server's ./package.json
    • module cache configured by cacheDirectories

Includes a minimal Node Cluster implementation to parallelize the single-threaded Node process across the available CPU cores.

Demo

Demo deployment: API calls from the Client app are fetched with a relative URL that is served by an Express handler in the Node server.

Usage

To immediately test the API, there are three (3) modes that are implemented: Query, Register, Notification

  1. Query
  • In this mode, the user can enter in the input field provided one or more email addresses (separated with comma ,) which identifies a tutor.
  • If there's only one (1) email address, the client shows the associated students with that tutor. If there are two or more email addresses, the client shows the students common to the tutors.
  1. Register
  • In this mode, the user can immediately fill the provided JSON "template" which represents the request body structure (use Shift+Enter to insert newline).
  • The API needs a valid tutor and students to be registered for that tutor.
  • With this, the user can "register" students to a specific tutor. The tutor will be automatically created if it's missing.
  1. Notification
  • In this mode, the user can immediately fill the provided JSON "template" which represents the request body structure (use Shift+Enter to insert newline).
  • The API needs a valid tutor and a notification that is not empty.
  • The client will show the students that will receive the notification:
    • Students that are not suspended
    • Students that are registered/associated with the tutor
    • Students that have been mentioned in the notification

Deploy to Heroku

git clone https://github.com/drichardcarl/ts-system.git
cd ts-system/
heroku create
git push heroku master

This deployment will automatically:

  • detect Node buildpack
  • build the app
  • launch the web process with npm start and serves client/out/ as static files

More about deploying to Heroku.

Local Development

Because this app is made of two npm projects, there are two places to run npm / yarn commands:

  1. Node/Express.js API server in backend directory
  2. Next.js Client in client/ directory

Run the API server

In a terminal:

# npm
npm install && npm run dev

# yarn
yarn && yarn dev

Run the Next.js client app

In a separate terminal from the API server, start the UI:

# npm
npm install && npm run dev

# yarn
yarn && yarn dev

ts-system's People

Contributors

drichardcarl 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.