Coder Social home page Coder Social logo

nktfh100 / campass Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.02 MB

A system that simplifies the process of inviting and admitting guests to various events.

Dockerfile 0.20% TypeScript 95.02% JavaScript 1.28% HTML 0.15% SCSS 3.26% Shell 0.09%

campass's Introduction

Logo

campass is a system that simplifies the process of inviting and admitting guests to various events.

Users can easily invite their guests to an event by adding them to the system, invited guests can then log in to the system to get their entry pass as a QR code which can be scanned at the event entrance to let them in.

The system enables easy and convenient guest entry via a smartphone.

Images

Media

Architecture

The system is deployed using docker compose.

It has the following services:

  • ngnix (For combining the frontend and backend)
  • backend
  • dozzle (for viewing logs)
  • shynet (for analytics)

Built With

Backend

  • Node.js
  • TypeScript
  • Fastify
  • knex.js
  • Sqlite as the database

Frontend

  • React
  • TypeScript
  • Axios
  • NextUI as the UI library
  • Zustand for state management
  • Sass
  • Typed scss modules for scss typing

Getting Started

Prerequisites

For local development you will need to install Node.js.

Installation

Run npm install in both the backend and frontend directories.

Environment Variables

For both the frontend and the backend copy the .env.example file to .env and fill in the required variables.

First Run

Run npm run migrate and npm run seed in the backend directory.

Running the app

Simply run npm run dev in both the backend and frontend directories.

Deployment

Initial Setup

Environment Variables

Edit the compose file and fill in all the environment variables.

Dozzle

Create a nginx/.htpasswd file to protect the service. (This tool can be used to generate the file.)

Running the app

Start the services using docker compose:

docker compose up -d

Shynet

Create an admin user:

docker exec shynet ./manage.py registeradmin <email>

Migrations

On the first run, it's necessary to run migrations to create the tables.

Execute the following command inside the container:

docker exec backend sh -c "npm run migrate"

Alternatively, you can pass in environment variable to the container to run the migrations on start:

RUN_MIGRATIONS=true

Tests

Tests are written using Jest, and run automatically on every push using GitHub Actions.

To run the tests locally, simply run npm run test in the backend directory.

campass's People

Contributors

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