https://github.com/marciocosta013/devtechblog-api_decolatech2025
Api feita para o blog devtech como projeto pessoal com os conceitos aprendidos no Decola Tech 2025
https://github.com/marciocosta013/devtechblog-api_decolatech2025
avanade dio-bootcamp full-stack java postgresql spring
Last synced: 8 months ago
JSON representation
Api feita para o blog devtech como projeto pessoal com os conceitos aprendidos no Decola Tech 2025
- Host: GitHub
- URL: https://github.com/marciocosta013/devtechblog-api_decolatech2025
- Owner: MarcioCosta013
- Created: 2025-04-04T03:34:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-04T03:38:29.000Z (about 1 year ago)
- Last Synced: 2025-04-04T04:26:56.700Z (about 1 year ago)
- Topics: avanade, dio-bootcamp, full-stack, java, postgresql, spring
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[JAVA_BADGE]:https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white
[SPRING_BADGE]: https://img.shields.io/badge/spring-%236DB33F.svg?style=for-the-badge&logo=spring&logoColor=white
Projeto API DevTech Blog
![java][JAVA_BADGE]
![spring][SPRING_BADGE]
[Repositorio do Frontend](https://github.com/MarcioCosta013/DevTechBlog-UI_DecolaTech2025)
**English version**: [Click here](#ingles).
>Backend do site do Blog DEVTECH...
✨ Funcionalidades
- **CRUD de Contribuidor** : Criar, ler, atualizar e excluir Contribuidores
- **CRUD de Sites**: Criar, ler, atualizar e excluir Sites
- **Relacionamento entre Entidades**: Sites vinculados a um Contribuidor que o compartilhou... (Many-to-One)
🛠️ Tecnologias
- **Java 21**
- **Spring Boot 3**
- Spring Data JPA
- Spring Validation
- **Flyway** (Migration)
- **Swagger/OpenAPI** (Documentação)
- **Lombok** (Gera automaticamente código repetitivo)
- **PostgreSQL** (Banco de dados)
- **Maven** (Gerenciamento de dependências)
📂 Estrutura do Projeto
````
src/
├── main/
│ ├── java/
│ │ └── com/
│ │ ├── devtechblog/
│ │ │ ├── config/ # Configurações (CorsConfig, SwaggerConfig)
│ │ │ ├── controller/ # Controladores (ContribuidorController, SitesController)
│ │ │ ├── dtos/ # Classes Records DTOs (ContribuidorDTO, SitesDTO)
│ │ │ ├── entity/ # Entidades JPA (ContribuidorEntity, SiteEntity)
│ │ │ ├── exception/ #Excesão personalisada (NotFoundException)
│ │ │ ├── repository/ # Repositórios Spring Data (ContribuidorRepository, TemaRepository)
│ │ │ └── service/ # Lógica de negócio (ContribuidorService, SiteService)
│ │ └──
│ ├── resources/
│ │ ├── db.migration/
│ │ │ ├── V202504051704__create_tecle_contribuidor.sql
│ │ │ └── V202504051714__create_table_sites.sql
│ │ ├── application.yml
│ │ └── application-dev.yml
└──
````
## Instruções para Executar o Projeto
1. Clone o repositório: `git clone https://github.com/MarcioCosta013/DevTechBlog-API.git`
2. Instale as dependências: `mvn clean install`
3. Execute o projeto: `mvn spring-boot:run`
4. Acesse o Swagger: `http://localhost:8080/swagger-ui.html`
## Usando Docker Compose
1. Clone o repositório: `git clone https://github.com/MarcioCosta013/DevTechBlog-API.git`
2. Acesse o diretório do projeto: `cd DevTechBlog-API`
3. Execute o comando: `docker-compose up`
4. Acesse o Swagger: `http://localhost:8080/swagger-ui.html`
### Parâmetros de Configuração
- DB_URL: URL do banco de dados
- DB_USER: Usuário do banco de dados
- DB_PASSWORD: Senha do banco de dados
- SPRING_PROFILES_ACTIVE: Perfil ativo do Spring
#### Exemplo de Uso
- Para executar o projeto com Docker, use o comando: docker run -p 8080:8080 devtechblog-api
- Para executar o projeto com Docker Compose, use o comando: docker-compose up
### Observações
> - Certifique-se de que o Docker esteja instalado e configurado corretamente no seu sistema.
> - Certifique-se de que o banco de dados esteja configurado corretamente e que as variáveis de ambiente estejam definidas.
## Documentação da API
- Swagger/OpenAPI: `http://localhost:8080/swagger-ui.html`
## 😎 Autor
**Marcio Costa**
* Github: [MarcioCosta013](https://github.com/MarcioCosta013)
* LinkedIn: [linkedin.com\/in\/marcio-jcosta\/](https://linkedin.com/in/https:\/\/www.linkedin.com\/in\/marcio-jcosta\/)
* Instagran: [@marcio_costa013](https://www.instagram.com/marcio_costa013/)
## 🤝 Contribuição
Contribuições, problemas e solicitações de recursos são bem-vindos!
Fique à vontade para conferir [issues page](https://github.com/MarcioCosta013/DecolaTech2025-angular-blog/issues).
## 🤩 Mostre seu apoio
Dê uma ⭐️ se este projeto te ajudou!
[JAVA_BADGE]:https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white
[SPRING_BADGE]: https://img.shields.io/badge/spring-%236DB33F.svg?style=for-the-badge&logo=spring&logoColor=white
DevTech Blog API Project
![java][JAVA_BADGE]
![spring][SPRING_BADGE]
[Frontend Repository](https://github.com/MarcioCosta013/DevTechBlog-UI_DecolaTech2025)
**Versão em Portuguese**: [Click aqui](#portugues).
> Backend of the DEVTECH Blog site...
✨ Features
- **Contributor CRUD**: Create, Read, Update, and Delete Contributors
- **Sites CRUD**: Create, Read, Update, and Delete Sites
- **Entity Relationships**: Sites linked to a Contributor who shared them (Many-to-One)
🛠️ Technologies
- **Java 21**
- **Spring Boot 3**
- Spring Data JPA
- Spring Validation
- **Flyway** (Database Migration)
- **Swagger/OpenAPI** (Documentation)
- **Lombok**
- **PostgreSQL** (Database)
- **Maven** (Dependency Management)
📂 Project Structure
````
src/
├── main/
│ ├── java/
│ │ └── com/
│ │ ├── devtechblog/
│ │ │ ├── config/ # Configuration files (CorsConfig, SwaggerConfig)
│ │ │ ├── controller/ # Controllers (ContribuidorController, SitesController)
│ │ │ ├── dtos/ # DTO Record Classes (ContributorDTO, SitesDTO)
│ │ │ ├── entity/ # # JPA Entities (ContributorEntity, SiteEntity)
│ │ │ ├── exception/ # Custom Exception (NotFoundException)
│ │ │ ├── repository/ # Spring Data Repositories (ContribuidorRepository, TemaRepository)
│ │ │ └── service/ # Business Logic (ContribuidorService, SiteService)
│ │ └──
│ ├── resources/
│ │ ├── db.migration/
│ │ │ ├── V202504051704__create_tecle_contribuidor.sql
│ │ │ └── V202504051714__create_table_sites.sql
│ │ ├── application.yml
│ │ └── application-dev.yml
└──
````
## Instructions to Run the Project
1. Clone the repository: `git clone https://github.com/MarcioCosta013/DevTechBlog-API.git`
2. Install the dependencies: `mvn clean install`
3. Run the project: `mvn spring-boot:run`
4. Access Swagger: `http://localhost:8080/swagger-ui.html`
## Using Docker Compose
1. Clone the repository: `git clone https://github.com/MarcioCosta013/DevTechBlog-API.git`
2. Access the project directory: `cd DevTechBlog-API`
3. Run the command: `docker-compose up`
4. Access Swagger: `http://localhost:8080/swagger-ui.html`
### Configuration Parameters
- DB_URL: Database URL
- DB_USER: Database user
- DB_PASSWORD: Database password
- SPRING_PROFILES_ACTIVE: Active Spring profile
#### Example Usage
- To run the project with Docker, use the command: docker run -p 8080:8080 devtechblog-api
- To run the project with Docker Compose, use the command: docker-compose up
### Notes
> - Make sure Docker is installed and configured correctly on your system.
> - Make sure the database is configured correctly and that environment variables are defined.
## API Documentation
- Swagger/OpenAPI: `http://localhost:8080/swagger-ui.html`
## 😎 Author
**Marcio Costa**
* Github: [MarcioCosta013](https://github.com/MarcioCosta013)
* LinkedIn: [linkedin.com\/in\/marcio-jcosta\/](https://linkedin.com/in/https:\/\/www.linkedin.com\/in\/marcio-jcosta\/)
* Instagram: [@marcio_costa013](https://www.instagram.com/marcio_costa013/)
## 🤝 Contribution
Contributions, issues, and feature requests are welcome!
Feel free to check [issues page](https://github.com/MarcioCosta013/DecolaTech2025-angular-blog/issues).
## 🤩 Show Your Support
Give a ⭐️ if this project helped you!