Skip to content

Reflection: Where your thoughts become documents, your memories become data, and MongoDB becomes your digital soul's best friend

Notifications You must be signed in to change notification settings

Get0Suguru/Reflection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŸ Reflection - Personal Journal Application

"App to live through the memories again" - A modern, secure journal application built with cutting-edge technology

Spring Boot MongoDB Java Maven

๐Ÿš€ Overview

Reflection is a sophisticated personal journaling application that leverages the power of MongoDB's document-based architecture to provide a seamless and scalable experience for managing personal memories and thoughts. Built with modern Spring Boot technology, this application demonstrates enterprise-grade development practices while maintaining simplicity and elegance.

๐ŸŽฏ Why MongoDB?

This project showcases the incredible capabilities of MongoDB as a NoSQL database solution:

  • ๐Ÿ”ฅ Document-Oriented Storage: Perfect for journal entries with flexible schema requirements
  • โšก High Performance: Lightning-fast read/write operations for seamless user experience
  • ๐Ÿ”„ ACID Transactions: Full transactional support ensuring data consistency across operations
  • ๐Ÿ“ˆ Horizontal Scalability: Built to handle growing amounts of personal data effortlessly
  • ๐ŸŽจ Rich Data Models: Native support for complex data structures and relationships
  • ๐Ÿ” Powerful Querying: Advanced querying capabilities for searching through memories

โœจ Features

๐Ÿ” Robust Authentication & Authorization

  • Secure user registration and login system
  • Role-based access control (USER/ADMIN roles)
  • Spring Security integration with custom authentication
  • Protected endpoints with JWT-like security context

๐Ÿ“ Advanced Journal Management

  • Create, read, update, and delete personal journal entries
  • Automatic timestamp management for entries
  • User-specific journal isolation and security
  • Rich content support for detailed memories

๐Ÿ‘ฅ User Management System

  • Complete user profile management
  • Secure password handling
  • User data integrity with MongoDB transactions
  • Admin panel for user oversight

๐Ÿ›ก๏ธ Enterprise-Grade Security

  • Spring Security configuration
  • Protected API endpoints
  • User context awareness
  • Secure data validation

๐Ÿ—๏ธ Architecture Highlights

MongoDB Integration Excellence

@Document(collection = "journals")
@Data
public class Journal {
    @Id
    private ObjectId id;
    private String title;
    private String content;
    private LocalDate date;
}
  • Document Collections: Optimized collections for users and journals
  • Database References: Smart @DBRef relationships between users and their journals
  • Transaction Management: Full ACID compliance with @Transactional operations
  • Indexing Strategy: Unique indexing on usernames for optimal performance

Modern Spring Boot Stack

  • Spring Boot 3.5.0: Latest enterprise framework
  • Spring Data MongoDB: Seamless database integration
  • Spring Security: Comprehensive security framework
  • Lombok: Clean, boilerplate-free code
  • Maven: Robust dependency management

๐Ÿ› ๏ธ Technology Stack

Technology Version Purpose
Java 21 Core programming language
Spring Boot 3.5.0 Application framework
MongoDB Latest NoSQL database
Spring Security Latest Security framework
Spring Data MongoDB Latest Database abstraction
Lombok Latest Code generation
Maven Latest Build automation

๐Ÿ“ Project Structure

src/main/java/com/geto/suguru/reflection/
โ”œโ”€โ”€ ๐Ÿ“ฑ controller/          # REST API endpoints
โ”‚   โ”œโ”€โ”€ JournalsController  # Journal CRUD operations
โ”‚   โ”œโ”€โ”€ UsersController     # User management
โ”‚   โ”œโ”€โ”€ AdminController     # Admin functionality
โ”‚   โ””โ”€โ”€ PublicController    # Public endpoints
โ”œโ”€โ”€ ๐Ÿ—ƒ๏ธ model/              # MongoDB document models
โ”‚   โ”œโ”€โ”€ User               # User entity with roles
โ”‚   โ”œโ”€โ”€ Journal            # Journal document
โ”‚   โ”œโ”€โ”€ UserProfile        # Security user details
โ”‚   โ””โ”€โ”€ ERole              # Role enumeration
โ”œโ”€โ”€ ๐Ÿ”ง service/            # Business logic layer
โ”‚   โ”œโ”€โ”€ JournalService     # Journal operations
โ”‚   โ””โ”€โ”€ UserService        # User operations
โ”œโ”€โ”€ ๐Ÿ“ฆ repo/               # MongoDB repositories
โ”œโ”€โ”€ ๐Ÿ›ก๏ธ config/            # Security configuration
โ”œโ”€โ”€ ๐Ÿ“‹ payload/            # DTOs and request/response objects
โ””โ”€โ”€ โš ๏ธ exception/          # Custom exception handling

๐Ÿš€ Getting Started

Prerequisites

  • Java 21 or higher
  • MongoDB instance (local or cloud)
  • Maven 3.6+

Installation

  1. Clone the repository

    git clone <repository-url>
    cd Reflection
  2. Configure MongoDB

    # application.properties
    spring.data.mongodb.uri=mongodb://localhost:27017/reflection
  3. Build the application

    ./mvnw clean install
  4. Run the application

    ./mvnw spring-boot:run

๐Ÿ“š API Documentation

๐Ÿ”“ Public Endpoints

  • GET /api/public/health - Health check
  • POST /api/public/create - User registration

๐Ÿ” Authenticated Endpoints

  • GET /api/journals/all - Get all user journals
  • POST /api/journals/create - Create new journal
  • PUT /api/journals/update/{id} - Update journal
  • DELETE /api/journals/delete/{id} - Delete journal

๐Ÿ‘‘ Admin Endpoints

  • GET /api/admin/all-users - Get all users (Admin only)

๐ŸŽฏ Current Status

This project represents a work in progress with a solid foundation already in place. The core functionality is implemented and demonstrates:

  • โœ… Complete MongoDB integration with transactions
  • โœ… Robust authentication system
  • โœ… Full CRUD operations for journals
  • โœ… Role-based access control
  • โœ… Enterprise-grade architecture

๐Ÿ”ฎ Future Enhancements

  • Frontend user interface
  • Advanced search and filtering
  • File attachments for journal entries
  • Social features and sharing
  • Mobile application
  • Advanced analytics and insights

๐Ÿค Contributing

This project showcases modern development practices and MongoDB's powerful capabilities. While currently in development, the foundation demonstrates enterprise-ready code quality and architecture.

๐Ÿ“„ License

This project is part of a portfolio demonstrating advanced Spring Boot and MongoDB integration skills.


Built with โค๏ธ using MongoDB's incredible NoSQL capabilities and Spring Boot's enterprise framework

"Every memory deserves to be preserved with the best technology available"

About

Reflection: Where your thoughts become documents, your memories become data, and MongoDB becomes your digital soul's best friend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published