Floppa is a API for a marketplace or auction website that allows sellers to list and sell their products, and buyers to browse and purchase products from various sellers.
How to run
- Java 11
- Maven
For the application to work, you need to set the following environment variables:
FLOPPA_MONGO_CLUSTER_URL=[A MongoDB cluster url]
FLOPPA_MONGO_DATABASE=[A MongoDB database name]
FLOPPA_HOST_EMAIL=[Whatever email you want to use as the sender for the email service]
FOPPA_HOST_PASSWORD=[The app password for the particular email]
You also need to specify the email domain used specified in src/main/resources/EmailNotificationConfig.properties
(default is gmail.com
)
mvn clean install
mvn exec:java
Endpoints
GET /health
- Checks the health status of the APIPOST /sellers
- Allows sellers to create an account and list their products.GET /sellers
- Retrieves a list of top sellers based on a ranking criteria.GET /sellers/{sellerId}
- Retrieves information about a specific seller.POST /products
- Allows sellers to create a new product listing.GET /products
- Retrieves a list of products with optional filters such as sellerId, title, category, minPrice and maxPriceGET /products/{productId}
- Retrieves detailed information about a specific product.POST /products/{productId}/sell
- Marks a product as sold by the sellerPOST /products/{productId}/offers
- Allows buyers to make an offer on a product
How to contribute
Everyone is welcomed to contribute! If you are interested, see the Contribution Guide.