Weekend Creative Challenge: MysteryBox — A Serverless AI Creativity Gym
give me the short dicription MysteryBox is a gamified, serverless AI creativity gym that challenges users to solve abstract scenarios using unexpected clues and constraints. Powered by Amazon Bedrock Nova Lite, it evaluates each idea across originality, innovation, feasibility, impact, clue connection, and surprise factor, then provides a visual creativity report, XP, achievements, and community feedback.
Weekend Creative Challenge: MysteryBox — A Serverless AI Creativity Gym
#creative-expression
Vision & what the app does
Most technical challenges ask you to find the correct answer.
I wanted to build something that asks a different question:
What if the challenge was to create an answer that nobody else thought of?
That idea became MysteryBox — a gamified, immersive creativity gym designed to train lateral thinking through unexpected constraints.
The concept is simple.
Instead of giving users a conventional problem statement, MysteryBox gives them an abstract scenario and a set of unusual clue variables. The user has to connect those clues, interpret the constraints, and invent an architectural solution within a limited amount of time.
For example, a challenge might reveal clues such as:
- Bone Conduction Cutlery
- Capillary Ceramic Ribs
- A strict implementation constraint
At first, the clues might seem completely unrelated.
That's intentional.
The goal is to force the builder to make unexpected connections.
The core experience
A user begins by entering a username and entering the Core Gym Hub, where they can see their level, XP, streak, ranking information, available cases, and achievements.
They then enter the Game Room.
A case is opened, the countdown begins, and three mystery clue cards are revealed.
The user has 10 minutes to develop a concept.
When they're ready, they click Lock In Concept.
The submission is sent to the backend, where Amazon Bedrock evaluates the idea across six dimensions:
Creativity Dimension | What it measures |
|---|---|
Originality | How unique the concept is |
Clue Connection | How effectively the clues were used |
Innovation | How creatively the problem was approached |
Feasibility | How realistic the implementation is |
Impact | Potential usefulness and value |
Surprise Factor | How unexpected the solution is |
Each dimension receives a score from 1–100.
The application then transforms those results into a visual AI Creativity Report, including a dynamic SVG radar chart and a personalized recommendation explaining how the concept could be improved.
But the experience doesn't stop there.
Completed challenges unlock the Community Arena, where users can inspect other concepts, vote on submissions, and participate in discussions.
The application also turns performance into a progression system through:
- XP
- Levels
- Streaks
- Achievements
- Leaderboards
- Creative performance statistics
The idea behind all of this is to create a continuous loop:
Challenge ↓Unlock Clues ↓Think Creatively ↓Build Concept ↓AI Evaluation ↓Creativity Report ↓Community Feedback ↓Improve ↓Try Another Challenge
MysteryBox isn't designed to replace human creativity with AI.
The human creates the idea. AI becomes the critic and coach.
How you built it
One of the decisions I made early was to keep the frontend intentionally lightweight.
The client is built using:
- HTML5
- CSS3
- Tailwind CSS
- Vanilla JavaScript
- ES6 modules
I wanted the application to feel more like a digital creativity gym than a traditional dashboard.
So the interface uses a futuristic dark theme with glassmorphism panels, radial glows, animated interactions, 3D clue-card flipping, countdown states, SVG visualizations, and achievement animations.
Building the game flow
The frontend is separated into modules for different responsibilities.
app.js handles the application routing and session initialization.mystery.js manages case selection, clue unlocking, card interactions, and the countdown timer.submission.js manages the submission state, XP calculations, levels, evaluation results, and the SVG radar chart.community.js handles votes and comment interactions.api.js acts as the communication layer between the frontend and the serverless backend.This separation made it easier to build the experience incrementally instead of putting the entire application into one large JavaScript file.
Making the AI evaluation server-side
I didn't want the browser to determine its own creativity score.
The concept is:
Browser │ │ User's concept ▼API Gateway │ ▼Lambda │ ▼AI Evaluation │ ▼Amazon Bedrock │ ▼Structured Scores │ ▼DynamoDB │ ▼Creativity Report
The backend is responsible for the actual evaluation.
The evaluation engine uses the AWS Strands Agents SDK with Amazon Nova Lite as the primary route.
I also included a fallback using the Boto3 Bedrock Converse API if the Strands SDK isn't available.
That gave the application a more resilient evaluation layer while still allowing me to experiment with an agent-based architecture.
Standardizing the AI output
One challenge with using an LLM for scoring is that natural-language responses aren't reliable enough for an application UI.
The application needs predictable data.
The frontend expects six numerical scores and a specific improvement recommendation.
So the AI instructions in
prompts.py force the model to return a standardized JSON structure rather than arbitrary prose.That allows the backend to transform the result into the radar chart and other UI components reliably.
Designing the database
For persistence, I chose a DynamoDB single-table design.
Instead of creating separate tables for cases, users, and submissions, the same table stores multiple entity types using different partition and sort-key patterns.
Cases use:
PK = CASESK = ID#<case_id>
Submissions use:
PK = SUBMISSION#<case_id>SK = USER#<username>
User profiles and statistics use:
PK = USERSK = USER#<username>
The table uses PAY_PER_REQUEST billing, which is a good fit for an MVP where traffic is unpredictable and there is no reason to provision capacity ahead of time.
The offline fallback
Another practical problem was development without a continuously available cloud backend.
I didn't want the entire application to become unusable whenever API Gateway wasn't reachable.
So
api.js includes a local simulation fallback.The behavior is roughly:
API Request │ ▼ Is AWS available? / \ YES NO │ │ ▼ ▼ API Gateway Local Simulation │ │ └─────┬──────┘ ▼ Frontend
This means I can demonstrate the full interaction flow even without an active AWS backend.
The biggest architectural decision
The most important decision was to treat creativity as a loop, rather than treating AI evaluation as the entire product.
It would have been easy to build:
Prompt → Bedrock → Score
But that would just be an AI scoring demo.
Instead, I built:
Challenge ↓Constraints ↓Human creativity ↓AI critique ↓Progression ↓Community ↓More creativity
That made the project feel like a product rather than simply an API integration.
AWS services used / architecture overview
MysteryBox is designed around a serverless AWS architecture.
AWS services
Amazon S3
Used for hosting the static frontend assets.
Amazon CloudFront
Provides the CDN layer for the frontend and works with S3 Origin Access Control.
Amazon API Gateway
Provides the HTTP API layer between the browser and the backend Lambda function.
AWS Lambda
Runs the serverless backend using Python 3.12.
The Lambda handles routes such as:
GET /casePOST /submitPOST /voteGET /leaderboard
Amazon Bedrock
Provides the AI evaluation engine using Amazon Nova Lite.
AWS Strands Agents SDK
Used to orchestrate the AI evaluation workflow.
Amazon DynamoDB
Stores:
- Cases
- User profiles
- User statistics
- Submissions
- Votes
- Community information
The project uses a single-table design with PAY_PER_REQUEST billing.
AWS IAM
Controls access between Lambda, DynamoDB, Bedrock, CloudWatch, and the other AWS resources using least-privilege permissions.
Amazon CloudWatch
Provides logging and operational visibility for the serverless backend.
Terraform
Used as the Infrastructure-as-Code layer to provision and manage the AWS environment.
Architecture overview
┌──────────────────────┐ │ USER │ │ Web Browser │ └──────────┬───────────┘ │ ▼ ┌──────────────────────┐ │ S3 + CloudFront │ │ Frontend Hosting │ └──────────┬───────────┘ │ ▼ ┌──────────────────────┐ │ API Gateway │ │ HTTP API │ └──────────┬───────────┘ │ ▼ ┌──────────────────────┐ │ Lambda │ │ Python 3.12 │ └───────┬───────┬──────┘ │ │ ┌────────────┘ └─────────────┐ ▼ ▼ ┌──────────────────┐ ┌──────────────────┐ │ Amazon Bedrock │ │ DynamoDB │ │ Nova Lite │ │ Single Table │ └────────┬─────────┘ └──────────────────┘ │ ▼ ┌──────────────────┐ │ AI Creativity │ │ Report │ └──────────────────┘
┌──────────────────┐ │ CloudWatch │ │ Logging │ └──────────────────┘
Terraform manages the infrastructure
The entire architecture is serverless, which keeps the MVP relatively simple to deploy and allows the infrastructure to scale without managing traditional servers.
What you learned
Building MysteryBox taught me that integrating AI into an application is very different from simply calling an AI API.
The interesting engineering problems appear around the model.
1. AI output needs structure
An LLM can produce impressive answers, but an application needs predictable data.
I learned to design prompts and backend validation around the application's expected schema rather than simply accepting whatever text the model returns.
2. AI works better as part of a system
The most useful role for Bedrock in MysteryBox isn't generating the entire experience.
The human generates the creative concept.
Bedrock evaluates it and provides feedback.
That division of responsibility makes the experience more interesting.
3. Serverless architecture changes how you design applications
Working with Lambda, API Gateway, DynamoDB, S3, and CloudFront pushed me to think in terms of:
- Events
- Stateless functions
- API contracts
- Access patterns
- IAM permissions
- Managed services
instead of thinking about a traditional server that runs continuously.
4. DynamoDB requires thinking about access patterns first
The single-table approach made me think differently about database design.
Instead of starting with:
"What tables should I create?"
I had to think:
"What information does the application need to retrieve, and how should those queries work?"
That mindset was one of the most valuable things I learned.
5. Offline-first thinking makes prototypes stronger
The local simulation mode taught me that cloud dependency doesn't have to mean development dependency.
Being able to continue testing the UI and game mechanics without the backend made the development process much smoother.
6. The hardest part was designing the experience
The biggest lesson from this challenge was that the technology wasn't the product.
Lambda isn't the product.
Bedrock isn't the product.
DynamoDB isn't the product.
The product is the creative loop connecting them.
The challenge, the clues, the countdown, the AI feedback, the progression system, and the community all exist to answer one question:
Can we make people practice creativity the way they practice technical skills?
That's what I wanted MysteryBox to explore.
And this MVP is my first attempt at building that gym.
Link to app or repo
MysteryBox — Serverless AI Creativity Gym
The goal of MysteryBox is simple:
Don't just solve problems. Train yourself to invent better ones.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article