Skip to content

The API server for HooliChat, a flutter communication application for small and medium scaled businesses

Notifications You must be signed in to change notification settings

ishitb/hoolichat-api

Repository files navigation

hoolichat-api

Maintaner Website shields.io GitHub issues GitHub issues-closed Open Source? Yes!

GitHub last commit

GitHub stars

GitHub stars

đź’» HooliChat

HooliChat API is an open source backend that can be deployed to any infrastructure that can run Node.js.

Developers
JavaScript
Build status Node.js 12,14,15 MongoDB 4.0,4.2,4.4

HooliChat API works with the Express web application framework. An API reference with SwaggerUI is available.

Introduction

Hoolichat is an open-source solution for small and medium businesses that brings together essential business features like team communication, task management, inventory management, invoicing, etc.

  • Indians want simple streamlined solutions.
  • Competing solutions are all closed-source, and create lock-in.
  • Most SMBs just prefer using the limited functionality of Whatsapp to avoid technicalities.
  • Better solutions are either too expensive or require technical prowess.

⚡Technology Stack

Getting Started

The fastest and easiest way to get started is to run MongoDB and HooliChat API locally.

Running HooliChat API

Before you start make sure you have installed:

  • NodeJS that includes npm
  • MongoDB
  • Optionally, you can use MongoDB Atlas Cloud for your database needs. Just remember to add the DB URI in the .env file.
  • Optionally Docker
  • Make sure you have all the environment variables configured, as mentioned in the .env.sample file.

Compatibility

Node.js

HooliChat API is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the Node.js Long Term Support plan and only test against versions that are officially supported and have not reached their end-of-life date.

Version Latest Version End-of-Life Date Compatibility
Node.js - 12.22.- April 20- âś… Fully compatible
Node.js - 14.16.- April 20- âś… Fully compatible
Node.js - 15.14.0 June 20- âś… Fully compatible

MongoDB

HooliChat API is continuously tested with the most recent releases of MongoDB to ensure compatibility. We follow the MongoDB support schedule and only test against versions that are officially supported and have not reached their end-of-life date.

Version Latest Version End-of-Life Date Compatibility
MongoDB 4.0 4.0.- January 20- âś… Fully compatible
MongoDB 4.2 4.2.- TBD âś… Fully compatible
MongoDB 4.4 4.4.- TBD âś… Fully compatible

Testing

Make sure you have installed all the npm libraries after cloning the repository and you can Run the following code to test the application as per our linters and testing modules:

$ npm run test

Swagger Generation

To document our REST APIs, we are using SwaggerUI, which allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client side consumption. To generate the configuration file for SwaggerUI we are using a tool called swagger-autogen, which allows us to run a single command to generate the configurations, and output them in a json file, which is then used by SwaggerUI. Make sure you have installed all the npm libraries after cloning the repository and run the following command:

$ npm run swagger:gen

Running HooliChat API Elsewhere

Sample Application

We have provided a basic Node.js application (deployed using a free Microsoft Azure Instance) that uses the HooliChat API module on Express and can be easily deployed to various infrastructure providers:

Configuration

Logging

HooliChat API will, by default, log:

  • to the console

Running

Using the CLI

The easiest way to run the HooliChat REST API is through the CLI:

$ git clone https://github.com/ishitb/hoolichat-api
$ cd hoolichat-api
$ npm install
$ npm run dev

After starting the server, you can visit http://localhost:3000/docs in your browser to start playing with your REST API.

Using Docker

$ git clone https://github.com/ishitb/hoolichat-api
$ cd hoolichat-api
$ docker build --tag hoolichat-api .

Running the HooliChat API Image

$ docker run --name my-hoolichat-api -p 3000:3000 -d hoolichat-api

🤝Contributing

Thank you for your interest in contributing to HooliChat API. Regardless of the size of the contribution you make, all contributions are welcome and are appreciated.

If you are new to contributing to open source, please read the Open Source Guides on How to Contribute to Open Source.

Ways to Contribute

If you are ready to start contributing code right away, we have a list of good first issues that contain issues with a limited scope.

Our Development Process

We utilize GitHub issues and pull requests to keep track of issues and contributions from the community.

Pull Request Guidelines

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

In order to give everyone a chance to submit a pull request and contribute to the HooliChat API project, we have put restrictions in place. This section outlines the guidelines that should be imposed upon pull requests in the HooliChat API project.

  • Pull requests must be based on open issues available or you can create your own issues.
  • Use this method to automatically close the issue when the PR is completed.
  • Each contributor may only create one pull request at a time. We have this rule in place due to our limited resources - if everyone was allowed to post multiple pull requests we will not be able to review them properly. It is also better for contributors because you can focus on creating one quality PR - so spend time making sure it is as good as it can be.
  • If the pull request's code quality is not up to our linting preferences, it would break the app. So please be careful when creating a PR.
  • All pull request must have test units. If for some reason it is not possible to add tests, please let us know and explain why. In that case, you'll need to tell us what steps you followed to manually test your changes.
  • Do not force push. If you make changes to your pull request, please simply add a new commit as that makes it easy for us to review your new changes. If you force push, we'll have to review everything from the beginning.
  • PR should be small, easy to review and should follow standard coding styles.
  • If PR has conflicts because of recently added changes to the same file, resolve issues, test new changes and submit PR again for review.
  • PRs should be atomic. That is, they should address one item (issue or feature)

Branching Strategies

For HooliChat API, we had employed the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the main branch:

  • develop: For unstable code and bug fixing
  • alpha-x.x.x: For stability testing
  • main: Where the stable production ready code lies

Contributing Code

Code contributions to HooliChat come in the form of pull requests. These are done by forking the repo and making changes locally.

Make sure you have read the Documentation for Setting up the Project

The process of proposing a change to HooliChat API can be summarized as:

  • Fork the HooliChat API repository and branch off main.
  • The repository can be cloned locally using git clone <forked repo url>.
  • Make the desired changes to the HooliChat API source.
  • Run the app and test your changes.
  • If you've added code that should be tested, write tests.
  • After making changes you can add them to git locally using git add <file_name>(to add changes only in a particular file) or git add . (to add all changes).
  • After adding the changes you need to commit them using git commit -m '<commit message>'(look at the commit guidelines below for commit messages).
  • Once you have successfully commited your changes, you need to push the changes to the forked repo on github using: git push origin <branch_name>.
  • Here branch name must be of the format <label>/<change-title>. The <label> must be the label of the issue you are resolving, be it feature, bug, etc.
  • Now create a pull request to the HooliChat repository from your forked repo. Open an issue regarding the same and link your PR to it.
  • Ensure the test suite passes, either locally or on CI once a PR has been created.
  • Review and address comments on your pull request if requested.

👨‍💻Contributors

This project exists thanks to all the people who contribute... we'd love to see your face on this list!


Ishit Beswal


Anant Bhasin


Nakul Gupta

About

The API server for HooliChat, a flutter communication application for small and medium scaled businesses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages