Git Product home page Git Product logo

plottwist's Introduction

Plot Twist drawing

Open in GitHub Codespaces

Choose your own adventure story generator built for the Supabase hackathon

About the Project

Plot Twist is a fullstack application developed using NextJS, SmythOS and Supabase. You can create your own unique story and make choices based on the story outcome. This leverages AI to get unique and interesting choices for the user to choose, so that the outcome of the story is different everytime. You tell your own story and share it to the outer world. There are many things you could do with the story created by other users. You can remix other's stories or comment on them. You can also regenerate story that was not to your liking and save them.

vercel

main page

ts

GitHub Language Count GitHub Top Language GitHub Issues GitHub Closed Issues GitHub Last Commit

How to navigate the Project ?

The project consists app folder, which is responsible for handling frontend and backend features. Below are the details on how the folders are structured to better understand the architecture of the application.

πŸ“‚root/
    β”œβ”€β”€ public/             # Public assets and HTML template
    β”œβ”€β”€ app/
    β”‚   β”œβ”€β”€ api/            # All main files
    β”‚   β”œβ”€β”€ app/            # Base app post login
    β”‚   β”œβ”€β”€ login/          # Login feature
    β”‚   β”œβ”€β”€ profile/        # Profile feature
    β”‚   β”œβ”€β”€ story/          # User story feature
    β”‚   β”œβ”€β”€ layout.tsx      # Headers and footers for the app
    β”‚   └── page.tsx        # Landing page
    β”‚
    └── components/         # Client components for the UI
    └── utils/              # React query and other utils
    └── lib/                # Server & DB actions with supabase auth
    └── ...

Features ✨

  • User Authentication: Users can create accounts, log in, and securely access their personalized profiles.
  • Responsive Design: Enjoy a consistent and visually appealing experience across various devices.
  • User Profile: User can manage their profile information and upload images.
  • Create Story: Create your own unique stories powered by AI.
  • Comments: Add a review comment for any story created by other users.
  • Remix: Reuse stories created by other users to brew your own unique version of the story.
  • Bookmarks: Bookmark your favourite stories to access them later.

Installation πŸ’»

To make the application run locally on your computer, you can follow the below steps:

Project setup:

Follow the steps below to setup the project locally:

  1. Clone the repository:

    git clone https://github.com/NeoFoxxo/plottwist.git
  2. Navigate to the project directory:

    cd plottwist

You can use npm / yarn / pnpm. Just replace pnpm with npm or yarn for all the commands.

Frontend setup:

To run the client locally, follow the below steps:

  1. Install the dependencies using pnpm / npm (make sure you have pnpm installed):

    npm install
  2. Start the development server for frontend:

    npm run dev
  3. Open your browser and visit http://localhost:3000/ to access the frontend of plottwist application.

Technologies Used πŸ”§

  • NextJS: Used by some of the world's largest companies, Next.js enables you to create high-quality web applications with the power of React components.
  • Typescript: TypeScript checks a program for errors before execution, ensures better developer experience.
  • React: JavaScript library for building user interfaces.
  • React Query: Also knows as Tanstack query for better data fetching.
  • TailwindCSS: A utility-first CSS framework packed with classes.
  • Zod: Zod for consistent input validation, data structuring, and error handling.
  • PostgreSQL: Supabase is used to manage our postgres database.

Contributing 🀝

We welcome open-source contributions to Plottwist project ! If you would like to contribute, please follow the below steps:

  1. Fork the repository.
  2. Create a new branch for your feature/fix: git checkout -b feature-name.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push the changes to your forked repository: git push origin feature-name.
  5. Open a pull request to the main repository's main branch.

Contributors

License πŸ“

This project is licensed under the GPL 3 License. Feel free to use, modify, and distribute the code as per the terms of the license.

Contact πŸ’¬

If you have any questions, suggestions, or feedback, please don't hesitate to reach out to the project maintainer.

plottwist's People

Contributors

neofoxxo avatar nidhish-nayak avatar xhyabunny avatar slaviiiii avatar

Stargazers

Brad Pillow avatar Parijat Bhattacharjee  avatar  avatar Yos avatar Bigo avatar ebowwa avatar Emre KayΔ±k avatar Kevin Ridgway avatar Umar Hansa avatar Kumar avatar Patrick Lima avatar Ajit Singh avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

plottwist's Issues

Critical Bug - Continue UI re-render

Bug - UI does not re-render to show updated story response

  • Continue response sends the correct data, database is updated correctly.
  • All the features work. Only problem is the new story response from ContinueStory is not rendered on UI with updated data.
  • This somehow works for "choices" and it re-renders correctly.
  • You can check the response & database to see that new story is correctly retrieved.
  • Hence it is most probably the UI re-render issue.

For now user has to refresh page to see updates to story.

Files in Use and to look into:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.