Skip to content

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

Notifications You must be signed in to change notification settings

HarshitPachori/StoryPath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • 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

git clone https://github.com/HarshitPachori/StoryPath.git

Backend

Running the Server

  • Server Directory

    cd storypath_backend
  • Setup Database

    • Create .env file in root of this directory (storypath_backend) and write below environment varibales in to this.
          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
      spring:
        application:
          name: storypath
        config:
          import: optional:file:storypath_backend/.env[.properties]
        profiles:
          active: ${ACTIVE_PROFILE}
      server:
        port: ${PORT}
  • Run Server

    ./mvnw spring-boot:run

Running the Frontend

  • Client Directory

    cd storypath_frontend
  • Update or Install Npm Packages

    npm install
  • Move to storypath_frontend/appConstants.js file

    • Add the following path in destination field of BASE_URL with your server url.

      export const BASE_URL = "http://localhost:8080/api/v1";
  • Run Client

    npm run dev

API Endpoints

  • Register User

     @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

     @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

     @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

     @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

     @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

     @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

     @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)

      {
        "statusCode": 200,
        "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqb2huQGdtYWlsLmNvbSIsImlhdCI6MTcxMDY3MjMyMSwiZXhwIjoxNzExNTcyMzIxfQ.LIc-mqKb1-RRsl4W4l4emn0GDfpSXDY1Wy6NfS9-7dY",
        "message": "Login Successfully",
        "success": true
      }
  • Error Responses

    {
      "statusCode": 400,
      "message": "All fields are required",
      "errors": [],
      "success": false
    }
    {
      "statusCode": 404,
      "message": "Resource Not Found with given Id",
      "errors": [],
      "success": false
    }
    {
      "statusCode": 401,
      "message": "You need to be logged in first in order to perform this action",
      "errors": [],
      "success": false
    }
    {
      "statusCode": 501,
      "message": "Internal Server Error",
      "errors": [],
      "success": false
    }
  • Snapshots

                                 

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages