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.
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
- 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
- Visual Studio Code(VS Code) ->
git clone https://github.com/HarshitPachori/StoryPath.git
-
Server Directory
cd storypath_backend
-
Setup Database
- Create
.env
file in root of this directory (storypath_backend) and write belowenvironment 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
filespring: application: name: storypath config: import: optional:file:storypath_backend/.env[.properties] profiles: active: ${ACTIVE_PROFILE} server: port: ${PORT}
- Create
-
Run Server
./mvnw spring-boot:run
-
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
-
@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
-
@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
-
@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
-
@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
-
@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
-
@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
-
@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
-
-
Login User/Driver (Success)
{ "statusCode": 200, "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqb2huQGdtYWlsLmNvbSIsImlhdCI6MTcxMDY3MjMyMSwiZXhwIjoxNzExNTcyMzIxfQ.LIc-mqKb1-RRsl4W4l4emn0GDfpSXDY1Wy6NfS9-7dY", "message": "Login Successfully", "success": true }
-
-
{ "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 }