Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harshitpachori/storypath
This is a Journal Application with features like Rich User Interface, Mobile Responsive, JWT Token based Authentication, Robust Backend, Light and Dark Mode, Weekly Sentiment Analysis , Email Notifications for weekly report and Account verification, etc
https://github.com/harshitpachori/storypath
caffeine-cache docker docker-compose gradle java javascript junit5 jwt-authentication lombok mockito mongodb npm reactjs spring-boot spring-cache spring-mail spring-security stanford-corenlp swagger-ui tailwindcss
Last synced: about 2 months ago
JSON representation
This is a Journal Application with features like Rich User Interface, Mobile Responsive, JWT Token based Authentication, Robust Backend, Light and Dark Mode, Weekly Sentiment Analysis , Email Notifications for weekly report and Account verification, etc
- Host: GitHub
- URL: https://github.com/harshitpachori/storypath
- Owner: HarshitPachori
- Created: 2024-07-01T10:16:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-03T10:29:41.000Z (5 months ago)
- Last Synced: 2024-08-03T11:35:33.773Z (5 months ago)
- Topics: caffeine-cache, docker, docker-compose, gradle, java, javascript, junit5, jwt-authentication, lombok, mockito, mongodb, npm, reactjs, spring-boot, spring-cache, spring-mail, spring-security, stanford-corenlp, swagger-ui, tailwindcss
- Language: JavaScript
- Homepage: https://story-path-nu.vercel.app
- Size: 5.39 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `Story Path - A Journaling Application`
This project is a `Journal application` by which a registered user can write journal entries about their daily experiences, or memorable moments. With a robust Backend in `Java` and `Spring Boot` & visualy appealing user interface or Frontend in `ReactJs` , `Javascript` and `TailwindCSS` for overall better user experience and easyness, we have developed this application.
## TECH STACK
- `Backend` : Java, Spring Boot, Spring Security, Spring Data JPA, JWT Authentication, MongoDB, Stanford Core NLP, Spring Mail, Spring Caching, Postman, Junit, Mockito, TestContainers, Docker, RestAssured, etc.
- `Frontend` : ReactJs, React Router Dom, TailwindCSS, Redux-Toolkit JavaScript, etc## Table of Contents
- [Software and Tools required](#software-and-tools-required)
- [Installation](#installation)
- [Running the Server](#running-the-server)
- [Running the Frontend](#running-the-frontend)
- [API Endpoints](#api-endpoints)- [Register User](#register-user)
- [Login User](#login-user)
- [User Profile](#user-profile)
- [Update User Profile](#update-user-profile)
- [Create Journal Entry](#create-journal-entry)
- [Get All Journal Entry Of User](#get-all-journal-entry-of-user)
- [Update Journal Entry](#update-journal-entry)- [Responses](#responses)
- [Success Responses](#success-responses)
- [Error Responses](#error-responses)
- [Postman Collection](#postman-collection)
- [Snapshots](#snapshots)## Software and Tools required
- JDK 17 or more
- NodeJs
- Git
- MongoDB Cliet or Server
- Docker
- For Backend (IDE or Editors)
- IntelliJ Idea (Community / Ultimate)
- Spring Tool Suite (STS)
- Eclipse
- NetBeans
- Visual Studio Code (VS Code)
- For Frontend (Editors)
- Visual Studio Code(VS Code) -> `Recommended`
- Sublime Text## Installation
### Clone Git Repository to your local machine
```bash
git clone https://github.com/HarshitPachori/StoryPath.git
```### Backend
## Running the Server
- Server Directory
```bash
cd storypath_backend
```- Setup Database
- Create `.env` file in root of this directory (storypath_backend) and write below `environment varibales` in to this.
```env
PORT=8080
MONGODB_URI=your mongodb cluster uri
GMAIL_USERNAME=your gmail id
GMAIL_APP_PASSWORD=your gmail app password
ACTIVE_PROFILE=dev
```
- Go to `ride_fast_backend/src/main/resources/application.yaml` file
```yaml
spring:
application:
name: storypath
config:
import: optional:file:storypath_backend/.env[.properties]
profiles:
active: ${ACTIVE_PROFILE}
server:
port: ${PORT}
```- Run Server
```bash
./mvnw spring-boot:run
```## Running the Frontend
- Client Directory
```bash
cd storypath_frontend
```- Update or Install Npm Packages
```bash
npm install
```
- Move to `storypath_frontend/appConstants.js` file- Add the following path in destination field of BASE_URL with your server url.
```js
export const BASE_URL = "http://localhost:8080/api/v1";
```- Run Client
```bash
npm run dev
```## API Endpoints
- ### Register User
```java
@route POST /api/v1/auth/register/user
@desc Register New User
@param {String} username
@param {String} email
@param {String} password
@returns {Object} User
@returns {StatusCode} 201 - Created
@returns {StatusCode} 400 - Bad Request
```- ### Login User
```java
@route POST /api/v1/auth/login
@desc Login User
@param {String} email
@param {String} password
@returns {Object} {String} accessToken
@returns {StatusCode} 200 - OK
@returns {StatusCode} 400 - Bad Request
@returns {StatusCode} 404 - Not Found
```- ### User Profile
```java
@route GET /api/v1/user/profile
@desc Get User Profile
@Header {String} jwtToken
@returns {Object} {String} message, {Object} User
@returns {StatusCode} 200 - OK
@returns {StatusCode} 400 - Bad Request
@returns {StatusCode} 404 - Not Found
```- ### Update User Profile
```java
@route PUT /api/v1/user/profile?wantsSentimentAnalysis=
@desc Get User Profile
@Header {String} jwtToken
@param {Boolean} wantsSentimentAnalysis
@returns {Object} {String} message, {Object} User
@returns {StatusCode} 200 - OK
@returns {StatusCode} 400 - Bad Request
@returns {StatusCode} 404 - Not Found
```- ### Create Journal Entry
```java
@route POST /api/v1/journal
@desc Create New Journal Entry
@header {Authorization} jwtToken
@param {String} title
@param {String} content
@param {Array} tags
@returns {Object} Journal Entry
@returns {StatusCode} 201 - Created
@returns {StatusCode} 400 - Bad Request
```- ### Get All Journal Entry Of User
```java
@route GET /api/v1/user/journal
@desc Get All Journal Entry Of User
@header {Authorization} jwtToken
@returns {List} Journal Entry
@returns {StatusCode} 200 - OK
@returns {StatusCode} 400 - Bad Request
```- ### Update Journal Entry
```java
@route POST /api/v1/journal/123456789
@desc Update Journal Entry
@header {Authorization} jwtToken
@param {String} journalId
@param {String} title
@param {String} content
@param {Array} tags
@returns {Object} Journal Entry
@returns {StatusCode} 200 - OK
@returns {StatusCode} 400 - Bad Request
```## Responses
- ### Success Responses
- Login User/Driver (Success)
```json
{
"statusCode": 200,
"accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqb2huQGdtYWlsLmNvbSIsImlhdCI6MTcxMDY3MjMyMSwiZXhwIjoxNzExNTcyMzIxfQ.LIc-mqKb1-RRsl4W4l4emn0GDfpSXDY1Wy6NfS9-7dY",
"message": "Login Successfully",
"success": true
}
```- ### Error Responses
```json
{
"statusCode": 400,
"message": "All fields are required",
"errors": [],
"success": false
}
``````json
{
"statusCode": 404,
"message": "Resource Not Found with given Id",
"errors": [],
"success": false
}
``````json
{
"statusCode": 401,
"message": "You need to be logged in first in order to perform this action",
"errors": [],
"success": false
}
``````json
{
"statusCode": 501,
"message": "Internal Server Error",
"errors": [],
"success": false
}
```- ## Snapshots