/ApiAnotaAiChallenge

Microserviço integrado com a AWS, o qual armazena catalogos no S3 utilizando uma SQS.

Primary LanguageJava

Restaurant Marketplace

AnotaAi Backend Challenge

Java Spring Licence MongoDB AWS

This project is an API built using Java, Java Spring, AWS Simple Queue Service, Mongo DB and AWS Simple Storage Service.

The Microservice was developed with Fernanda Kipper Youtube Channel, to demonstrate how to solve the AnotaAi Backend Challenge.

A basic documentation of steps on how to implement this project using AWS.

Notion

Table of Contents

Installation

  1. Clone the repository:
git@github.com:PedroH183/ApiAnotaAiChallenge.git
  1. Install dependencies with Maven

  2. Create a configuration with your runtime environment variables with your AWS Credentials that are used in application.properties

aws.region=us-east-1
aws.accessKeyId=${AWS_KEY_ID}
aws.secretKey=${AWS_SECRET}

Config Values

AWS_KEY_ID=VALUE;AWS_SECRET=VALUE2

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:

API PRODUCT

POST /api/product - Create a new product
GET /api/product - Retrieve all products
PUT /api/product/{id} - Updates a product
DELETE /api/product/{id} - Delete a product

BODY

{
  "title": "Produto para postar no tópico",
  "description": "",
  "ownerId": "4444444",
  "categoryId": "659d558b0304df732ddd4587",
  "price": 10000
}

API CATEGORY

POST /api/category - Create a new category
GET /api/category - Retrieve all categories
PUT /api/category/{id} - Updates a category
DELETE /api/category/{id} - Delete a category

BODY

{
  "id": "393948882828",
  "title": "Teste",
  "description": "",
  "ownerId": "4444444"
}