Skip to content

rohit-gohri/inno

Repository files navigation

Inno - A fest website

The site has been deployed using Fly.io and MongoDB Atlas at https://inno.fly.dev/

Home Page

Events Page

The site features the following functions :

  1. Login/Register using FB and Local
  2. Automatic generation of unique IDs for all users on successful registration (INNO-ID)
  3. Admin and Event Manager(EM) accounts with special functions
  4. Create events and update operations for EMs
  5. Ability to register for events by users
  6. View participants and export to Excel for EMs
  7. Automatic mailing through Mailgun on registration
  8. Mass mailing to all registered users through Mailgun

Installation

Requirements

Steps

  1. Clone the project using git and cd into it:

    git clone https://github.com/rohit-gohri/inno.git
    cd inno
  2. Run npm install - this installs all the dependencies of the project (found in package.json) :

    npm install

Config File

There is a config/default.json config file that provides default value Add a production.json and development.json file in the config directory. These files are used to store API keys and various other variable configurations like : site-url, contact-form-email, etc. Only add the things you want to overwrite in default.json.

It needs to have the following format :

{
  "mailgun": {
    "auth": {
      "api_key": "<your-mailgun-api-key>",
      "domain": "<domain-registered-on-mailgun>"
    }
  },
  "url": "<domain-name-on-which-this-is-setup>",
  "hashids": {
    "secret": "<hash-secret-for-unique-id-generation>",
    "no_chars": 4,
    "chars": "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
  },
  "contactEmail": "<email-for-contact-form>",
  "dbhost": "<mongodb-host-url",
  "sessionSecret": "<session-secret>",
  "fb": {
    "clientID": "<FB-app-id-for-login>",
    "clientSecret": "<fb-app-secret>",
    "callbackURL": "<site-url> + /login/fb/callback"
  }
}

Mailgun API Key

This is used for sending emails. Signup and get your own key here: https://www.mailgun.com/email-api/

FB Client ID and Secrets

This is used for Login with Facebook. Create your own app and get your own key here: https://developers.facebook.com/docs/development/create-an-app/

Run

  • Development (localhost) - this will read overrides from config/development.json

    npm run dev
  • Development Watch Mode (uses nodemon)

    npm run dev:watch
  • Production - this will read overrides from config/production.json

    npm run start
  • Production PM2

    pm2 start ecosystem.config.js --env production

Admin Access

To get access to admin panel, you'll have to manually mark a user as is_admin: true in the DB. You'll need MongoDB Compass or other similar tool for it.

Click to expand detailed steps.
  1. Connect to DB

    image
  2. Select inno-site DB

    image
  3. Select accounts collection

    image
  4. Set is_admin: true for the required user

    image
  5. After that if you go to profile you'll have these extra buttons (also a button to add other event managers)

    image
  6. And if you are an Admin or an Event Manager (EM) you'll get access to edit event details and see participant info on event page

    image

Contributors

See Github Contributors: https://github.com/rohit-gohri/inno/graphs/contributors

Animations & Illustrations By Utkarsh Yadav: @utkarshyadav5