A simple End-to-End Encrypted (E2EE) journal application built with Spring Boot and MongoDB.
- Create, read, update, and delete journal entries
- RESTful API
- MongoDB for persistent storage
- Health check endpoint
- Java 17+
- Maven
- MongoDB (running locally on default port 27017, or configure in
application.properties)
git clone <repo-url>
cd JournalAppBy default, the app connects to MongoDB at localhost:27017 and uses the journaldb database. You can change this in src/main/resources/application.properties.
./mvnw spring-boot:runOr build the JAR:
./mvnw clean package
java -jar target/journalApp-0.0.1-SNAPSHOT.jarGET /health-check→ returnsOk
GET /journal→ List all journal entriesPOST /journal→ Create a new journal entry- Body:
{ "title": "...", "content": "..." }
- Body:
GET /journal/id/{id}→ Get a journal entry by IDPUT /journal/id/{id}→ Update a journal entry by ID- Body:
{ "title": "...", "content": "..." }
- Body:
DELETE /journal/id/{id}→ Delete a journal entry by ID
{
"id": "<ObjectId>",
"title": "My Day",
"content": "Today was great!",
"date": "2024-04-27T12:34:56"
}- id: MongoDB ObjectId
- title: String
- content: String
- date: LocalDateTime (set automatically on creation)
Edit src/main/resources/application.properties to change MongoDB host, port, or database name. Example:
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=journaldb
Run tests with:
./mvnw testThis project is for educational/demo purposes.