A secure RESTful Journal Application built using Spring Boot, MongoDB, and Spring Security. The application enables users to create, manage, and organize personal journal entries while providing role-based access control, weather integration, caching, scheduled tasks, and email notifications.
- User Registration & Authentication
- Create Journal Entries
- View All Personal Journal Entries
- Update Existing Journal Entries
- Delete Journal Entries
- Update User Profile
- Delete Account
- Spring Security Authentication
- Role-Based Access Control
- Protected User Endpoints
- Admin-Only Operations
- View All Users
- Create Admin Users
- Clear Application Cache
- MongoDB Database Integration
- Redis Caching Support
- Weather API Integration
- Scheduled Tasks using Spring Scheduler
- Email Notification Service
- Custom Repository Implementations
| Technology | Purpose |
|---|---|
| Java 8 | Programming Language |
| Spring Boot 2.7 | Backend Framework |
| Spring Security | Authentication & Authorization |
| Spring Data MongoDB | Database Layer |
| MongoDB | NoSQL Database |
| Redis | Caching |
| Spring Mail | Email Service |
| Maven | Dependency Management |
| Lombok | Boilerplate Reduction |
journalApp/
├── controller/
│ ├── PublicController
│ ├── UserController
│ ├── JournalEntryController
│ └── AdminController
│
├── service/
│ ├── UserService
│ ├── JournalEntryService
│ ├── WeatherService
│ └── EmailService
│
├── repository/
│ ├── UserRepository
│ ├── JournalEntryRepository
│ └── ConfigJournalAppRepository
│
├── entity/
│ ├── User
│ ├── JournalEntry
│ └── ConfigJournalAppEntity
│
├── scheduler/
│ └── UserScheduler
│
├── cache/
│ └── AppCache
│
└── config/
└── SpringSecurity
- Java 8+
- Maven 3+
- MongoDB
- Redis (Optional)
- SMTP Email Account (Optional)
git clone https://github.com/Archit-d300/Journal-App.git
cd Journal-App/journalAppUpdate your application.yml or application.properties:
spring:
data:
mongodb:
uri: mongodb://localhost:27017/journaldb
mail:
host: smtp.gmail.com
port: 587
username: your-email
password: your-passwordConfigure Redis if enabled:
spring:
redis:
host: localhost
port: 6379Using Maven:
mvn spring-boot:runOr:
mvn clean install
java -jar target/journalApp-0.0.1-SNAPSHOT.jarApplication starts at:
http://localhost:8080
| Method | Endpoint | Description |
|---|---|---|
| GET | /public/healthCheck |
Application Health Check |
| POST | /public/create-user |
Register New User |
| Method | Endpoint |
|---|---|
| GET | /user |
| PUT | /user |
| DELETE | /user |
| Method | Endpoint |
|---|---|
| GET | /journal |
| POST | /journal |
| GET | /journal/id/{id} |
| PUT | /journal/id/{id} |
| DELETE | /journal/id/{id} |
| Method | Endpoint |
|---|---|
| GET | /admin/all-users |
| POST | /admin/create-admin-user |
| GET | /admin/clear-app-cache |
The application includes scheduled tasks for:
- Refreshing application cache
- Processing user sentiment summaries
- Sending automated email notifications
Current scheduler:
@Scheduled(cron = "0 0 9 * * SUN")Runs every Sunday at 9:00 AM.
The application fetches weather information using an external Weather API and displays personalized greetings to authenticated users.
Example:
Hi John, Weather Today: Weather feels like 31°C
Email services are used to:
- Send sentiment analysis summaries
- Deliver scheduled notifications
- Support future user engagement features
mvn testTests cover:
- User Service
- User Details Service
- Email Service
- Repository Layer
Implemented using Spring Security:
- Authentication
- Password Encoding
- Protected Routes
- Admin/User Roles
- Secure API Access
- JWT Authentication
- Swagger/OpenAPI Documentation
- Docker Support
- Kubernetes Deployment
- Full Sentiment Analysis using NLP
- Frontend Dashboard
- Mobile Application
- Entry Search & Filtering
- File Attachments
- End-to-End Encryption
Archit Deshpande
- GitHub: https://github.com/Archit-d300
This project is licensed under the MIT License.
Feel free to fork, improve, and contribute.