Project Info
This project did not submit a demo video on Devpost.
Inspiration
We love spending time playing role based games as well as chatting with AI, so we figured a great app idea would be to combine the two.
What it does
Creates a fun and interactive AI powered story game where you control the story and the AI continues it for as long as you want to play. If you ever don't like where the story is going, simply double click the last point you want to travel back to and restart from there! (Just like in Groundhog Day)
How we built it
We used Reflex as the full-stack Python framework to develop an aesthetic frontend as well as a robust backend. We implemented 2 of TogetherAI's models to add the main functionality of our web application.
Challenges we ran into
From the beginning, we were unsure of the best tech stack to use since it was most members' first hackathon. After settling on using Reflex, there were various bugs that we were able to resolve by collaborating with the Reflex co-founder and employee on site.
Accomplishments we're proud of
All our members are inexperienced in UI/UX and frontend design, especially when using an unfamiliar framework. However, we were able to figure it out by reading the documentation and peer programming. We were also proud of optimizing all our background processes by using Reflex's asynchronous background tasks, which sped up our website API calls and overall created a much better user experience.
What we learned
We learned an entirely new but very interesting tech stack, since we had never even heard of using Python as a frontend language. We also learned about the value and struggles that go into creating a user friendly web app we were happy with in such a short amount of time.
What's next
More features are in planning, such as allowing multiple users to connect across the internet and roleplay on a single story as different characters. We hope to continue optimizing the speeds of our background processes in order to make the user experience seamless.
Live Version
Check out our deployed site at https://groundhog1.reflex.run/ to test it yourself!
Analysis
View
Metric
- 37
- 35
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- HTMLIn code
- PythonIn code
2 of 2 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
216 KB
Source files
19
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
pnavab/calhacks2023
28 files · 246 KB · @ 00e5ac7
Structure
Interface
11 files · 39%Screens, components and styles rendered to the user.
Application logic
6 files · 21%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- HTML86%
- Python13%
- Markdown0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi · 2- reflex
- together
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
AI-generated interactive text adventure storyVerified
Creates a fun and interactive AI powered story game where you control the story and the AI continues it
Claimed on Devposthigh confidencecalhacks2023/backend/ai.py:17— get_ai_response builds a dialogue prompt and calls together.Complete.create with llama-2-7b-chat to continue the storycalhacks2023/state.py:80— State.answer appends the user's action to chat_history and calls get_ai_response, then streams the result back to the UIcalhacks2023/components/textbox.py:89— action_bar input feeds State.question, submitted via State.answer to drive the ongoing story
Built with Reflex full-stack Python frameworkVerified
We used Reflex as the full-stack Python framework to develop an aesthetic frontend as well as a robust backend
Claimed on Devposthigh confidencerequirements.txt:2— reflex==0.3.0 is a declared dependencycalhacks2023/calhacks2023.py— main app module built on reflex app conventions (rxconfig.py, pages/, components/, state.py)
Multiple art style backgrounds/themes (forest, ocean, medieval, steampunk, cartoon)Verified
Implied by the theme toggle and art-style-driven image generation supporting the story game experience
Claimed on readmemedium confidencecalhacks2023/state.py:173— toggle_forest/toggle_steampunk/toggle_ocean/toggle_medieval/toggle_cartoon set an active theme used for image generation promptscalhacks2023/backend/ai.py:43— get_ai_image takes an art_style parameter to pad the image generation prompt
Reflex asynchronous background tasks for API callsVerified
We were proud of optimizing all our background processes by using Reflex's asynchronous background tasks, which sped up our website API calls
Claimed on Devposthigh confidencecalhacks2023/state.py:80— State.answer, change_background_color, set_background_image, and stream are all decorated with @rx.background and use async/await for the Together AI calls
Time travel: revert story to earlier pointVerified
If you ever don't like an outcome of a choice you can go back in time to replay your own actions by double clicking the last point you want to travel back to
Claimed on Devposthigh confidencecalhacks2023/components/textbox.py:70— on_double_click=State.show_revert_modal(index) on each qa entry opens a confirmation modalcalhacks2023/components/textbox.py:21— modal 'Travel' button calls State.save_checkpoint() to commit the revertcalhacks2023/state.py:155— save_checkpoint truncates chat history to the selected index and creates a new 'Re:' branch/tab from that point
Together AI integration (two models)Verified
We implemented 2 of TogetherAI's models to add the main functionality
Claimed on Devposthigh confidencecalhacks2023/backend/ai.py:22— togethercomputer/llama-2-7b-chat used for story continuationcalhacks2023/backend/ai.py:46— stabilityai/stable-diffusion-xl-base-1.0 used via together.Image.create for scene images
Multiple story tabs / sessionsCode-supported
Implicit in the story-branching/time-travel feature: distinct story instances are tracked as tabs
Claimed on readmemedium confidencecalhacks2023/state.py:15— tabs list and chats dict track multiple named story sessions, with create_new/switch_tabs managing themcalhacks2023/components/sidebar.py— sidebar component likely renders the tabs list, but its content was not read in detail
Live deployed siteBlocked
Check out our deployed site at https://groundhog1.reflex.run/ to test it yourself
Claimed on readmelow confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.