ParthasarathiMahana / whosin

open-source attendance tracking server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License


Who's in?

An open-source attendance tracking server.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Modes
  4. Roadmap
  5. Contributing
  6. License

About The Project

This is an open-source attendance tracking server. It is designed to be have multiple modes which are different ways to track attendance. The different modes are explained in the Modes section.

(back to top)

Built With

  • TypeScript
  • Docker
  • Redis

(back to top)

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

  • Git
    You can download Git from here.
  • NodeJS
    You can download NodeJS from here.
  • Redis You can download Redis from here.
  • Docker
    You can download Docker from here.

Installation

  1. Clone the repo

    git clone https://github.com/kalviumcommunity/whosin.git
  2. File the .env file with the required values. You can use the .env.example file as a template. You may skip the redis config, if using docker-compose.yml.

  3. Start the server

     docker compose -f .\docker-compose.dev.yml up
  4. The server will be running on port 3443. You can access the server at http://localhost:3443/.

    Additionally, you can access the redis insights at http://localhost:8001/. The default password is unsecure-password-7RElMQM3oF. Learn more about redis insights here.

(back to top)

Modes

A Mode refers to how the server tracks the attendance. The server can be configured to use any of the registerd modes while creating a new session. The server comes with a Manual mode.

Addional mode to the server can be added by extending the BaseMode interface. The BaseMode interface is defined in src/modes/baseMode.ts. The BaseMode interface has the following methods:

interface BaseMode {
    modeName: string;

    createSession(sessionInfo: SessionCreationAttrs): Promise<Session>;
    getSessionInfo(sessionInfo: Session, data: any): Promise<Session>;
    updateSession(sessionInfo: Session, data: Session): Promise<Session>;
    deleteSession(sessionInfo: Session): Promise<Session>;
    recordEntry(sessionInfo: Session, data: any): Promise<Session>;
    getSessionReport(sessionInfo: Session): Promise<Session>;
}

In order to create a session the following attributes are standard:

export interface Session {
    start_time: string;
    end_time: string;
    callback: string;
    mode: string;
    participants: any[];
    metadata: any;
}
  • start_time: The start time of the session.
  • end_time: The end time of the session.
  • callback: The callback URL to be called when the session ends.
  • mode: The mode to be used for the session. (One of the registered modes)
  • participants: The list of participants in the session.
  • metadata: Any additional information required by the mode.

(back to top)

Roadmap

  • Manual Mode
  • Self Check-in Mode

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please read CONTRIBUTING.md for details on how to setup this project locally and the process for submitting pull requests to us.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

About

open-source attendance tracking server

License:MIT License


Languages

Language:TypeScript 99.0%Language:Dockerfile 1.0%