/AlmatarLoyalty

almatar loyalty software engineering test

Primary LanguageJavaScript

Almatar Loyalty

This is a Node.js Express API used to send loyalties from one user to another Using PostgreSQL

Table of Contents

  1. Getting Started
  2. Prerequisites
  3. Installation
  4. Environment Variables
  5. Running the Application
  6. Testing
  7. Contributing
  8. License

Getting Started

Follow these steps to set up and run the application on your local environment.

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository: git clone https://github.com/OmarElsamahy/almatarloyalty.git cd almatarloyalty

Environment Variables

  1. Install dependencies: npm install
  2. Set up the database: Create a PostgreSQL database (e.g., yourprojectdb). Configure your database connection in src/config/database.js or through environment variables (see below).
  3. Setup Environment files (copy .envv.example to .env and adjust your settings)
  4. api/v1/docs is only present in development

Running The Application

  • You could use npm start -> to run using PM2 process manager
  • npm run dev -> to run using nodemon
  • Workflow is as follows ->
    • Auth apis for user to sign up/ login , reset and forget password
    • user apis to list users and get user details
    • transfer apis for user to create a transfer, confirm a transfer he created and list all transactions

Testing

npm test

Contributing

Contributions are welcome! Please follow these guidelines:

Fork the repository and create a new branch for your changes. Ensure your code adheres to the project's style guidelines. Add tests to cover your changes. Open a pull request, providing a clear description of the changes.

License

This project is licensed under the MIT License.

Key Points to Consider

  • Getting Started: Explain how to set up the project for development or production.
  • Environment Variables: Detail the required environment variables and how to set them up.
  • Installation and Prerequisites: Describe the installation process and any prerequisites.
  • Running the Application: Provide clear instructions for running the application.
  • Testing: Include instructions for running tests and what to expect.
  • Contributing: Explain how others can contribute and what you expect from contributions.
  • License: Specify the license for your project.