/swahilibox-events-api

SwahiliBox Events API develop with Express and PostgreSQL

Primary LanguageJavaScriptMIT LicenseMIT

Welcome to swahilibox events api

An API that will provide a fucntionality for SwahiliBox Admins to be able to create and manage events. On the other hand, other users of the system can be able to view and respond to the events. This will aid for better communication between SwahiliBox and the community and hence better planing of activities going forward.

Application features

Appart from normal authentication the app will provide the following functionality

  • Creating Events
  • Responding to Events

An Admin user can perform the following:

  • create an events.
  • view the events in the system.
  • edit and update events.
  • delete events.
  • view RSVPs events in the system.

A normal user can perform the following:

  • View a list of upcoming events.
  • Respond to the events they want to attend.

The following endpoints should be available to use once the API is complete:

EndPoint Functionality
POST /api/v1/register Create a user account
POST /api/v1/login login a user
POST /api/v1/events Create an Event
GET /api/v1/events Get All Events
GET /api/v1/events/:id Get an Event
PUT /api/v1/events/:id Update an Event
DELETE /api/v1/events/id Delete an Event
POST /api/v1/events//rsvp Register a user to an event(Rsvp)
GET /api/v1/events//rsvp Get all event guests

Technologies used to buildthe application

Expressjs Framework

PostgreSQL Database

Jestjs Testing Framework

Sequelize ORM

Getting started with the application

Clone the repo here to your local machine

download and install nodejs.

install Yarn version for your operating system.

Install PostgreSQL and create a database to be used by the application

  • visit the official getting started page
  • Here is also a tutorial to do so on windows

create a .env file and provide the necessary values as shown in the .env.sample file

Install dependencies

yarn install (prefered) or npm install

Then run the command below to start the application in development mode

yarn start:dev or npm run start:dev

Switch to the master branch for stable/working features

git checkout master

The application is under constant development. The develop branch has the latest changes added into the app

Contributing to the application

You can fork the repo and contribute features you want included