https://github.com/lizar22/fem-cloud-api
RESTful API built with Java via Spring Boot that lets you manage and explore quotes by feminist and pioneering women throughout history
https://github.com/lizar22/fem-cloud-api
api-rest database feminist-data feministech java jpa-hibernate maven mysql quotes-api restful-api spring-boot women-in-tech
Last synced: 3 months ago
JSON representation
RESTful API built with Java via Spring Boot that lets you manage and explore quotes by feminist and pioneering women throughout history
- Host: GitHub
- URL: https://github.com/lizar22/fem-cloud-api
- Owner: Lizar22
- Created: 2025-06-09T10:47:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-28T13:42:57.000Z (11 months ago)
- Last Synced: 2025-07-28T15:34:08.803Z (11 months ago)
- Topics: api-rest, database, feminist-data, feministech, java, jpa-hibernate, maven, mysql, quotes-api, restful-api, spring-boot, women-in-tech
- Language: Java
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πͺ FemCloud API
**FemCloud API** is a RESTful API built with **Spring Boot** that lets you manage and explore quotes by **feminist and pioneering women** throughout history. It's designed as a learning project and a tribute to the words and ideas that inspired generations of women and men.
## π Table of Contents
- [π Project Purpose](#-project-purpose)
- [β¨ Thematic Focus](#-thematic-focus)
- [π οΈ Technologies & Tools](#οΈ-technologies--tools)
- [ποΈ Project Structure](#οΈ-project-structure)
- [π Functional Requirements](#-functional-requirements)
- [π API Endpoints](#-api-endpoints)
- [π¦ Example JSON for Creating/Updating a Quote](#-example-json-for-creatingupdating-a-quote)
- [β οΈ Error Handling](#οΈ-error-handling)
- [π§ͺ Testing with Postman](#-testing-with-postman)
- [β
Non-Functional Requirements](#-non-functional-requirements)
- [π‘ Possible Future Improvements](#-possible-future-improvements)
- [π§ What I Learned](#-what-i-learned)
- [π Suggested Directory Structure](#-suggested-directory-structure)
- [π§Ύ License](#-license)
## π Project Purpose
This project helps you:
- Learn how to build a complete CRUD REST API using Spring Boot
- Understand the MVC architecture (Controller β Service β Repository)
- Connect a Spring Boot app to a **MySQL** database
- Practice API testing with **Postman**
- Promote historical and inspirational quotes from impactful women
## β¨ Thematic Focus
This API is dedicated to preserving and sharing **quotes by feminist thinkers, activists, and historical pioneers**.
Examples of influential women:
- **Simone de Beauvoir**
- **Wu Zetian**
- **Rosa Luxemburg**
- **Audre Lorde**
- **Christine de Pizan**
- **Clara Campoamor**
- **Aspasia of Miletus**
- **Frida Kahlo**
- **Angela Davis**
- **Nana Asmaβu**
- **Olympe de Gouges**
- **Virginia Woolf**
- **Im Yunjidang**
- **Malala Yousafzai**
- **Qiu Jin**
- **Dolores IbΓ‘rruri**
- **Hypatia of Alexandria**
Quotes should reflect feminist thought, social change, human rights, or historical relevance.
## π οΈ Technologies & Tools
- β
Java 21
- β
Spring Boot
- β
MySQL
- β
Jakarta Bean Validation
- β
Maven
- β
IntelliJ IDEA
- β
Postman
- β
Git & GitHub
- β
Trello (for task tracking)
## ποΈ Project Structure
The project follows a clean **3-layer MVC architecture**:
```
src/
βββ main/
β βββ java/com/femcloudapi
β βββ controllers
β βββ dtos
β βββ exceptions
β βββ models
β βββ repositories
β βββ services
βββ resources/
β βββ application.properties
β βββ data.sql
βββ test/
β βββ application-mysql.properties
````
## π Functional Requirements
- [x] View all quotes
- [x] View a quote by ID
- [x] Create a new quote
- [x] Update an existing quote
- [x] Delete a quote
## π API Endpoints
| Method | Endpoint | Description |
| ------ | -------------- | -------------------------- |
| GET | `/quotes` | Get all quotes |
| GET | `/quotes/{id}` | Get a specific quote by ID |
| POST | `/quotes` | Add a new quote |
| PUT | `/quotes/{id}` | Update an existing quote |
| DELETE | `/quotes/{id}` | Delete a quote |
## π¦ Example JSON for Creating/Updating a Quote
```json
{
"text": "I am not free while any woman is unfree, even when her shackles are very different from my own.",
"author": "Audre Lorde",
"year": 1981
}
```
## β οΈ Error Handling
When a quote is not found by ID, the API responds with a structured JSON error and a `404` status code:
```json
{
"message": "Quote not foud with id 99",
"status": 404,
"errorCode": "PRODUCT_NOT_FOUND",
"path": "/quotes/99",
"timestamp": "2025-07-20 23:49:18"
}
```
This is handled via a custom exception `QuoteNotFoundException`, a `GlobalExceptionHandler` and an `ErrorResponse` class.
## π§ͺ Testing with Postman
1. Run the application with your IDE (e.g., IntelliJ, VS Code)
2. Use Postman to test all API endpoints
3. Ensure your MySQL database is running and configured
4. Update `application.properties` or `application.yml` with correct DB settings
## β
Non-Functional Requirements
* Clean MVC architecture
* Connection to MySQL database
* Clean and maintainable code
* Error handling with custom messages
* Manual API testing via Postman
* Input validation using `@Valid`
## π‘ Possible Future Improvements
* Pagination and search by author
* Swagger/OpenAPI documentation
* Spring Security authentication
## π§ What I Learned
* Building REST APIs with Spring Boot
* Use of `JpaRepository` for CRUD operations
* Structuring code using MVC pattern
* Error handling using custom exceptions
* Testing endpoints with Postman
* Integration tests via H2 and Mysql profiles
## π Suggested Directory Structure
```
src/
βββ main/
β βββ java/com/femcloudapi
β βββ controllers
β βββ dtos
β βββ exceptions
β βββ models
β βββ repositories
β βββ services
βββ resources/
β βββ application.properties
β βββ data.sql
βββ test/
β βββ application-mysql.properties
```
## π§Ύ License
This project is part of the FemCoders educational program.
## π Created with π by Lizar22
FemCloud API is more than just a CRUD project β it's a tribute to feminist voices and an essential part of my Spring Boot learning journey, combining backend development practice with the creation of powerful, respectful software.