/PromptBasedStoryGeneration-BackendAndFrontendUsingReactJSAndExpressJS-

User can provide a prompt, through the frontend UI and backend will use that prompt to generate a story with the help of open ai and will persist the story in db. User can see leaderboard based on the upVotes for a story and user can upVotea a story as well.

Primary LanguageJavaScript

Prompt based story generation project using ReactJS and ExpressJS as the tech stack.

This root project folder is a react js project which have expressJS backed backend under backend-prompt-based-story dir.

Available Scripts (Frontend ReactJS)

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

Available Scripts (Backend ExpressJS)

Under the root project directory we have directory called backend-prompt-based-story changing to this directory, you can run:

npm start

Before running npm start , user need to provide the valid mongodb url and open api key (inside .env file present under backend-prompt-based-story dir), so that the backend can use db to store the stories data and open api key to communicate with open ai model.

Open [http://localhost:3001] with the proper endpoint to make the http rest calls.