Git Product home page Git Product logo

partners-api's Introduction

Partners API

Java Spring Postgres

This project is an API built using Java, Java Spring, Flyway Migrations, PostgresSQL as the database, and Spring Security for authentication control.

The API simulates the functionality of a food delivery platform like iFood and Zé Delivery. Users can register themselves into the app, and logged-in users can search for nearby restaurant partners, while ADMIN users can register new partners in the API.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/your-username/project-name.git
  1. Install dependencies with Maven

  2. Install PostgresSQL

  3. Install Postgis Extension

Usage

  1. Start the application with Maven
  2. The API will be accessible at http://localhost:8080

API Endpoints

The API provides the following endpoints:

GET /partners - Retrieve a list of all partners.

GET /partners/{partnerId} - Retrieve a specific partner by ID.

POST /partners - Register a new partner (ADMIN access required).

GET /partners/search - Search for partners near a specified location.

POST /auth/login - Login into the App

POST /auth/register - Register a new user into the App

Authentication

The API uses Spring Security for authentication control. The following roles are available:

ROLE_USER - Standard user role for logged-in users.
ROLE_ADMIN - Admin role for managing partners (registering new partners).

To access protected endpoints as an ADMIN user, provide the appropriate authentication credentials in the request header.

Database

The project utilizes PostgresSQL as the database. The necessary database migrations are managed using Flyway.

Also, this project is using the PostgresSQL extension Postgis to store coordinates in GeoJson pattern.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request to the repository.

When contributing to this project, please follow the existing code style, commit conventions, and submit your changes in a separate branch.

partners-api's People

Contributors

fernanda-kipper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

partners-api's Issues

Duvida sobre padronização de commits

Por que você utiliza feat, refactor, fix e alguma boa prática eu gostei muito como posso usar eles nos meus commits?

Geralmentes eu só tento descrever eles botar uma foto só para te da uma ideia

image

quero fazer commits melhores

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.