Skip to content

aastha-sin-09/JournalApp-SpringBoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 JournalSS App (Backend)

Java Spring Boot MongoDB Docker Made with Maven Swagger Docs

🚧 Deployed at:
🔗 https://journalss-backend.onrender.com/journal/swagger-ui/index.html


📖 About

This is the backend for the JournalSS App – a secure and private journaling platform built with Spring Boot 3.3.12.
It provides REST APIs for user registration, login, journal entry management, and admin controls.


🚀 Features

  • 🔐 JWT-based user authentication
  • ✍️ CRUD operations for journal entries
  • 📈 Integrated Sentiment Analysis API
  • 👩‍💼 Admin dashboard for managing users
  • 📄 Interactive Swagger UI for API testing
  • 🛢️ MongoDB for fast, scalable storage
  • 🐳 Docker-ready for easy deployment
  • ⏰ Daily journal reminder emails (via scheduler)

🧱 Tech Stack

Category Tech Used
Language Java 17
Framework Spring Boot 3.3.12, Spring Security
Database MongoDB
Build Tool Maven
Docs & Test Swagger (SpringDoc OpenAPI)
Deployment Docker, Render

🧪 Getting Started

Clone the repository

git clone https://github.com/aastha-sin-09/JournalApp-SpringBoot.git
cd JournalApp-SpringBoot

Set up environment variables

Create a .env file in the root directory with the following values:

MONGO_URI=mongodb+srv://yourusername:yourpassword@cluster.mongodb.net/dbname
JWT_SECRET=your_jwt_secret
MAIL_USERNAME=youremail@example.com
MAIL_PASSWORD=your_app_password
SENTIMENT_API_KEY=your_sentiment_api_key

⚙️ Running the App

1. Using Maven

./mvnw spring-boot:run

Or, package and run:

./mvnw clean package
java -jar target/journalApp-0.0.1-SNAPSHOT.jar

2. Using Docker

docker build -t journal-app .
docker run -p 8081:8081 --env-file .env journal-app

📄 API Documentation (Swagger)

🔗 Swagger UI – Test All Endpoints

Example endpoints:

  • POST /auth/signup – Create a new user
  • POST /auth/login – Get JWT token
  • GET /user/entries – Get your journal entries (Requires JWT)
  • POST /journal/entry – Create journal with sentiment analysis

You can interact with public and secured routes directly from the Swagger interface.


🧱 Project Structure

journalApp/
├── .env
├── .gitignore
├── Dockerfile
├── pom.xml
├── README.md
├── src/
│   ├── main/
│   │   ├── java/com/aastha/journalApp/
│   │   │   ├── JournalApplication.java
│   │   │   ├── config/
│   │   │   │   ├── GlobalCorsConfig.java
│   │   │   │   ├── JwtAuthFilter.java
│   │   │   │   ├── SpringSecurity.java
│   │   │   │   └── SwaggerConfig.java
│   │   │   ├── controller/
│   │   │   │   ├── AdminController.java
│   │   │   │   ├── AuthController.java
│   │   │   │   ├── JournalEntryController.java
│   │   │   │   └── UserEntryController.java
│   │   │   ├── dto/
│   │   │   │   ├── SentimentResponse.java
│   │   │   │   ├── UserLogin.java
│   │   │   │   └── UserSignUp.java
│   │   │   ├── entity/
│   │   │   │   ├── JournalEntry.java
│   │   │   │   └── User.java
│   │   │   ├── repository/
│   │   │   │   ├── JournalEntryRepository.java
│   │   │   │   ├── UserRepository.java
│   │   │   │   ├── UserRepositoryCustom.java
│   │   │   │   └── UserRepositoryImpl.java
│   │   │   ├── Scheduler/
│   │   │   │   └── EmailScheduler.java
│   │   │   ├── service/
│   │   │   │   ├── EmailService.java
│   │   │   │   ├── JournalEntryService.java
│   │   │   │   ├── SentimentService.java
│   │   │   │   ├── UserDetailsServiceImpl.java
│   │   │   │   └── UserService.java
│   │   │   └── util/
│   │   │       └── JwtUtil.java
│   │   └── resources/
│   │       ├── application.yml
│   │       ├── application-dev.yml
│   │       └── application-prod.yml

🌐 Deployment

This backend is deployed on Render using Docker.

🔗 Live Swagger Docs:
https://journalss-backend.onrender.com/journal/swagger-ui/index.html

To deploy your own version:

  • Connect this repo to Render
  • Use Docker environment
  • Add required environment variables
  • Render automatically builds and deploys from the Dockerfile

🤝 Contributors


🧩 Want to Contribute?

Contributions are welcome! Follow these steps:

  1. Fork the repository
  2. Create a new branch:
    git checkout -b feature-name
  3. Make your changes and commit:
    git commit -m "Add feature"
  4. Push your branch:
    git push origin feature-name
  5. Open a Pull Request on GitHub

📜 License

This project is private and intended for educational/personal use.

About

A Spring Boot backend for JournalSS – a secure journaling app with JWT auth and REST APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published