Skip to content

MOKSHITH096/journal-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“– Journal Application

Java Spring Boot Spring Security MongoDB Redis Maven JUnit

A secure RESTful Journal Management API built using Spring Boot and MongoDB Atlas. The application implements JWT Authentication, Spring Security, and Role-Based Access Control (RBAC) to provide secure access to journal management features. It also integrates Redis Caching, Weather API, Email Notifications, and Scheduled Tasks, showcasing modern backend development practices.


πŸš€ Features

πŸ‘€ User Features

  • User Registration
  • Secure Login using JWT Authentication
  • Create Journal Entries
  • View Personal Journal Entries
  • Update Existing Journal Entries
  • Delete Journal Entries
  • Users can access only their own journal entries

πŸ‘¨β€πŸ’Ό Admin Features

  • View All Users
  • Delete Users
  • View All Journal Entries
  • Role-Based Access Control (ROLE_USER, ROLE_ADMIN)

πŸ” Security

  • JWT Authentication
  • Spring Security
  • Authentication & Authorization
  • Role-Based Access Control (RBAC)
  • Custom JWT Filter
  • Protected REST APIs
  • Secure Password Encryption

☁️ Database

  • MongoDB Atlas Cloud Database
  • Spring Data MongoDB Integration

⚑ Additional Features

  • Redis Caching
  • Weather API Integration
  • Email Notifications
  • Scheduled Tasks
  • Unit Testing with JUnit

πŸ› οΈ Tech Stack

Technology Purpose
Java 17 Programming Language
Spring Boot 2.7.18 Backend Framework
Spring Security Security Framework
JWT Authentication
MongoDB Atlas Cloud Database
Spring Data MongoDB Database Access
Redis Caching
Maven Build Automation
Lombok Boilerplate Code Reduction
JUnit 5 Unit Testing

πŸ—οΈ Project Architecture

                 Client
                    β”‚
                    β–Ό
            JWT Authentication
                    β”‚
                    β–Ό
          Spring Security Filter
                    β”‚
                    β–Ό
              REST Controllers
                    β”‚
                    β–Ό
                 Services
                    β”‚
                    β–Ό
              Repositories
                    β”‚
                    β–Ό
              MongoDB Atlas

πŸ“‚ Project Structure

journal-application
β”‚
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ main
β”‚   β”‚   β”œβ”€β”€ java
β”‚   β”‚   β”‚   β”œβ”€β”€ controller
β”‚   β”‚   β”‚   β”œβ”€β”€ service
β”‚   β”‚   β”‚   β”œβ”€β”€ repository
β”‚   β”‚   β”‚   β”œβ”€β”€ entity
β”‚   β”‚   β”‚   β”œβ”€β”€ config
β”‚   β”‚   β”‚   β”œβ”€β”€ filter
β”‚   β”‚   β”‚   β”œβ”€β”€ scheduler
β”‚   β”‚   β”‚   β”œβ”€β”€ cache
β”‚   β”‚   β”‚   β”œβ”€β”€ constants
β”‚   β”‚   β”‚   β”œβ”€β”€ enums
β”‚   β”‚   β”‚   β”œβ”€β”€ apiResponse
β”‚   β”‚   β”‚   └── utils
β”‚   β”‚   β”‚
β”‚   β”‚   └── resources
β”‚   β”‚
β”‚   └── test
β”‚
β”œβ”€β”€ pom.xml
β”œβ”€β”€ README.md
└── .gitignore

πŸ”Œ REST API Overview

Method Functionality Access
POST Register User Public
POST Login User Public
GET View Personal Journals User
POST Create Journal User
PUT Update Journal User
DELETE Delete Journal User
GET View All Users Admin
DELETE Delete User Admin
GET View All Journals Admin
GET Weather Information Authenticated

Note: Endpoint URLs may differ depending on your controller mappings.


βš™οΈ Installation

Clone the Repository

git clone https://github.com/MOKSHITH096/journal-application.git

Navigate to the Project

cd journal-application

Configure Environment Variables

Configure the following environment variables before running the project:

MONGODB_URI
REDIS_URL
MAIL_USERNAME
MAIL_PASSWORD
WEATHER_API_KEY
JWT_SECRET

Build the Project

mvn clean install

Run the Application

mvn spring-boot:run

The application will start at:

http://localhost:8081

πŸ§ͺ Testing

Run all unit tests using:

mvn test

πŸ“Έ API Screenshots

User Registration User Login
Create Journal View Journals
Update Journal Delete Journal
Weather API

πŸš€ Future Enhancements

  • Swagger / OpenAPI Documentation
  • Docker Containerization
  • Global Exception Handling
  • Request Validation
  • Pagination & Sorting
  • CI/CD Pipeline
  • Refresh Token Support
  • API Rate Limiting

πŸ‘¨β€πŸ’» Author

Mokshith

Backend Developer | Java | Spring Boot | Spring Security | MongoDB | REST APIs


⭐ If you found this project useful, consider giving it a star on GitHub!

About

Secure Journal Management REST API built with Spring Boot, Spring Security, JWT, MongoDB Atlas, Redis, and Maven.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages