π§π· PortuguΓͺs
Memorix Γ© uma API REST robusta e completa para um sistema de aprendizado com flashcards que implementa algoritmos de repetiΓ§Γ£o espaΓ§ada. O sistema permite que usuΓ‘rios criem, gerenciem e estudem flashcards de forma eficiente, otimizando o processo de memorizaΓ§Γ£o atravΓ©s de tΓ©cnicas cientificamente comprovadas.
- π AutenticaΓ§Γ£o Completa: Login local e OAuth2 com Google
- π€ Gerenciamento de UsuΓ‘rios: Registro, verificaΓ§Γ£o de email, redefiniΓ§Γ£o de senha
- π¦ Baralhos (Decks): CriaΓ§Γ£o e organizaΓ§Γ£o de conjuntos de flashcards
- π Flashcards: Sistema completo de CRUD para cartΓ΅es de estudo
- π§ RepetiΓ§Γ£o EspaΓ§ada: Algoritmo inteligente baseado no mΓ©todo SuperMemo
- π EstatΓsticas: AnΓ‘lise detalhada do progresso de aprendizado
- πΌοΈ Upload de Imagens: Suporte para imagens nos flashcards
- π NotificaΓ§Γ΅es: Sistema de email para aΓ§Γ΅es importantes
- π Monitoramento: MΓ©tricas com Prometheus e dashboards Grafana
- π SeguranΓ§a: JWT tokens, validaΓ§Γ£o de dados, rate limiting
- Java 21 com Virtual Threads para alta performance
- Spring Boot 3.5.3 - Framework principal
- Spring Security - AutenticaΓ§Γ£o e autorizaΓ§Γ£o
- PostgreSQL - Banco de dados principal
- MongoDB - Armazenamento de flashcards e reviews
- Redis - Cache e sessΓ΅es
- RabbitMQ - Mensageria assΓncrona
- Docker & Docker Compose - ContainerizaΓ§Γ£o
- Flyway - Migrations de banco de dados
- MapStruct - Mapeamento de objetos
- OpenAPI/Swagger - DocumentaΓ§Γ£o da API
- TestContainers - Testes de integraΓ§Γ£o
- MinIO - Armazenamento de arquivos
- Prometheus - Coleta de mΓ©tricas
- Grafana - VisualizaΓ§Γ£o de dados
- Spring Actuator - Health checks e mΓ©tricas
- Java 21+
- Docker e Docker Compose
- Maven 3.9+
- Clone o repositΓ³rio:
git clone https://github.com/andrehsvictor/Memorix-API.git
cd Memorix-API
- Inicie os serviΓ§os de infraestrutura:
docker-compose -f docker-compose.dev.yml up -d
- Configure as variΓ‘veis de ambiente:
cp src/main/resources/application-dev.yml.example src/main/resources/application-dev.yml
# Edite o arquivo com suas configuraΓ§Γ΅es
- Execute a aplicaΓ§Γ£o:
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
- Instale as dependΓͺncias:
./mvnw clean install
-
Configure o banco de dados PostgreSQL e outros serviΓ§os
-
Execute:
./mvnw spring-boot:run
src/main/java/andrehsvictor/memorix/
βββ auth/ # AutenticaΓ§Γ£o e autorizaΓ§Γ£o
βββ card/ # Gerenciamento de flashcards
βββ deck/ # Gerenciamento de baralhos
βββ user/ # Gerenciamento de usuΓ‘rios
βββ review/ # Sistema de revisΓ£o
βββ image/ # Upload e gerenciamento de imagens
βββ common/ # UtilitΓ‘rios e configuraΓ§Γ΅es
βββ MemorixApplication.java
POST /api/v1/auth/token
- Login com credenciaisPOST /api/v1/auth/google
- Login com Google OAuthPOST /api/v1/auth/refresh
- Renovar tokenPOST /api/v1/auth/revoke
- Revogar token
POST /api/v1/users
- Registro de usuΓ‘rioGET /api/v1/users/me
- Perfil do usuΓ‘rioPUT /api/v1/users/me
- Atualizar perfilPUT /api/v1/users/me/password
- Atualizar senhaDELETE /api/v1/users/me
- Deletar contaPOST /api/v1/users/verify-email
- Verificar emailPOST /api/v1/users/send-action-email
- Enviar email de aΓ§Γ£oPOST /api/v1/users/me/send-email-change-verification
- Enviar verificaΓ§Γ£o de mudanΓ§a de emailPUT /api/v1/users/email
- Alterar emailPOST /api/v1/users/reset-password
- Redefinir senha
GET /api/v1/decks
- Listar baralhosPOST /api/v1/decks
- Criar baralhoGET /api/v1/decks/{id}
- Obter baralhoPUT /api/v1/decks/{id}
- Atualizar baralhoDELETE /api/v1/decks/{id}
- Deletar baralho
GET /api/v1/cards
- Listar todos os cartΓ΅esGET /api/v1/cards/stats
- EstatΓsticas gerais dos cartΓ΅esGET /api/v1/cards/{cardId}
- Obter cartΓ£o especΓficoGET /api/v1/decks/{deckId}/cards
- CartΓ΅es por baralhoGET /api/v1/decks/{deckId}/cards/stats
- EstatΓsticas de cartΓ΅es por baralhoPOST /api/v1/decks/{deckId}/cards
- Criar cartΓ£oPUT /api/v1/cards/{cardId}
- Atualizar cartΓ£oDELETE /api/v1/cards/{cardId}
- Deletar cartΓ£o
GET /api/v1/reviews
- Listar todas as revisΓ΅esGET /api/v1/cards/{cardId}/reviews
- RevisΓ΅es por cartΓ£oPOST /api/v1/cards/{cardId}/reviews
- Criar revisΓ£o
POST /api/v1/images
- Upload de imagem
# Executar todos os testes
./mvnw test
# Testes de integraΓ§Γ£o
./mvnw test -Dspring.profiles.active=test
# Coverage report
./mvnw test jacoco:report
- AplicaΓ§Γ£o: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui.html
- Actuator: http://localhost:8080/actuator
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000 (admin/admin)
- FaΓ§a um fork do projeto
- Crie uma branch para sua feature (
git checkout -b feature/AmazingFeature
) - Commit suas mudanΓ§as (
git commit -m 'Add some AmazingFeature'
) - Push para a branch (
git push origin feature/AmazingFeature
) - Abra um Pull Request
Este projeto estΓ‘ sob a licenΓ§a MIT. Veja o arquivo LICENSE
para mais detalhes.
Andre Victor
- Email: andrehsvictor@gmail.com
- GitHub: @andrehsvictor
πΊπΈ English
Memorix is a robust and comprehensive REST API for a flashcard learning system that implements spaced repetition algorithms. The system allows users to create, manage, and study flashcards efficiently, optimizing the memorization process through scientifically proven techniques.
- π Complete Authentication: Local login and OAuth2 with Google
- π€ User Management: Registration, email verification, password reset
- π¦ Decks: Creation and organization of flashcard sets
- π Flashcards: Complete CRUD system for study cards
- π§ Spaced Repetition: Intelligent algorithm based on SuperMemo method
- π Statistics: Detailed learning progress analysis
- πΌοΈ Image Upload: Support for images in flashcards
- π Notifications: Email system for important actions
- π Monitoring: Prometheus metrics and Grafana dashboards
- π Security: JWT tokens, data validation, rate limiting
- Java 21 with Virtual Threads for high performance
- Spring Boot 3.5.3 - Main framework
- Spring Security - Authentication and authorization
- PostgreSQL - Main database
- MongoDB - Flashcards and reviews storage
- Redis - Cache and sessions
- RabbitMQ - Asynchronous messaging
- Docker & Docker Compose - Containerization
- Flyway - Database migrations
- MapStruct - Object mapping
- OpenAPI/Swagger - API documentation
- TestContainers - Integration testing
- MinIO - File storage
- Prometheus - Metrics collection
- Grafana - Data visualization
- Spring Actuator - Health checks and metrics
- Java 21+
- Docker and Docker Compose
- Maven 3.9+
- Clone the repository:
git clone https://github.com/andrehsvictor/Memorix-API.git
cd Memorix-API
- Start infrastructure services:
docker-compose -f docker-compose.dev.yml up -d
- Configure environment variables:
cp src/main/resources/application-dev.yml.example src/main/resources/application-dev.yml
# Edit the file with your configurations
- Run the application:
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
- Install dependencies:
./mvnw clean install
-
Configure PostgreSQL database and other services
-
Run:
./mvnw spring-boot:run
src/main/java/andrehsvictor/memorix/
βββ auth/ # Authentication and authorization
βββ card/ # Flashcard management
βββ deck/ # Deck management
βββ user/ # User management
βββ review/ # Review system
βββ image/ # Image upload and management
βββ common/ # Utilities and configurations
βββ MemorixApplication.java
POST /api/v1/auth/token
- Login with credentialsPOST /api/v1/auth/google
- Login with Google OAuthPOST /api/v1/auth/refresh
- Refresh tokenPOST /api/v1/auth/revoke
- Revoke token
POST /api/v1/users
- User registrationGET /api/v1/users/me
- User profilePUT /api/v1/users/me
- Update profilePUT /api/v1/users/me/password
- Update passwordDELETE /api/v1/users/me
- Delete accountPOST /api/v1/users/verify-email
- Verify emailPOST /api/v1/users/send-action-email
- Send action emailPOST /api/v1/users/me/send-email-change-verification
- Send email change verificationPUT /api/v1/users/email
- Change emailPOST /api/v1/users/reset-password
- Reset password
GET /api/v1/decks
- List decksPOST /api/v1/decks
- Create deckGET /api/v1/decks/{id}
- Get deckPUT /api/v1/decks/{id}
- Update deckDELETE /api/v1/decks/{id}
- Delete deck
GET /api/v1/cards
- List all cardsGET /api/v1/cards/stats
- General card statisticsGET /api/v1/cards/{cardId}
- Get specific cardGET /api/v1/decks/{deckId}/cards
- Cards by deckGET /api/v1/decks/{deckId}/cards/stats
- Card statistics by deckPOST /api/v1/decks/{deckId}/cards
- Create cardPUT /api/v1/cards/{cardId}
- Update cardDELETE /api/v1/cards/{cardId}
- Delete card
GET /api/v1/reviews
- List all reviewsGET /api/v1/cards/{cardId}/reviews
- Reviews by cardPOST /api/v1/cards/{cardId}/reviews
- Create review
POST /api/v1/images
- Upload image
# Run all tests
./mvnw test
# Integration tests
./mvnw test -Dspring.profiles.active=test
# Coverage report
./mvnw test jacoco:report
- Application: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui.html
- Actuator: http://localhost:8080/actuator
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000 (admin/admin)
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is under the MIT license. See the LICENSE
file for more details.
Andre Victor
- Email: andrehsvictor@gmail.com
- GitHub: @andrehsvictor
- π API Documentation (Swagger)
- π Monitoring Dashboard
- π³ GitHub Repository
- π Live Demo