I want to build a clone of https://bracket.city/ but with Swedish language. Backend should be built with rails and frontend with Svelte
I'll help you create a Swedish version of Bracket City with a Rails backend and Svelte frontend. Let's start with the Svelte frontend component that matches the interface shown in the screenshot.
Here's a Svelte component that recreates the main interface:
BracketCity.svelte
For the Rails backend, you'll need to set up:
Here's a high-level overview of the Rails backend structure:
code
Set up Rails API backend:
Set up Svelte frontend:
Deploy:
Would you like me to elaborate on any specific part of this implementation?
In Bracket City you can solve any clue just by submitting an answer No need to click, just type the answer to any highlighted clue and hit enter! Keep guessing until you get one. This is an example where you should add your word instead of [opposite of clean] and [game played with a cue ball]: where [opposite of clean] dishes pile up or exercise in a [game played with a cue ball]
Thank you for the clarification! Now I understand how Bracket City works - it's a word game where players fill in bracketed clues within sentences. Let me create a Swedish version of this game with the correct gameplay mechanics.
BracketStad.svelte
For the Rails backend, you'll need models and controllers to handle puzzles and user answers:
code
code
code
Set up Rails API backend:
rails new bracket-stad-api --api
Set up Svelte frontend:
npm create vite@latest bracket-stad -- --template svelte
Connect frontend to backend:
Deploy:
Would you like me to elaborate on any specific part of this implementation?
To explain the game further:
I want to build a game. The player is presented with a text, like this:
[where [opposite of clean] dishes pile up] or [exercise in a [game played with a cue ball]]
just each inner bracket pair is playable. and the text between is the clue for the word the player has to guess. solving a clue replaces that bracket pair with the word the player has guessed and makes the next outer bracket pair playable. Solving the last clue wins the game.
Every bracket pair that doesn't have a nested bracket pair is highlighted in a different color.
You can solve any clue just by submitting an answer No need to click, just type the answer to any highlighted clue and hit enter! Keep guessing until you get one!
When you for example type pool
the text above replaces with:
[where [opposite of clean] dishes pile up] or [exercise in a pool]
Clues are often nested within other clues You'll need to solve opposite of clean to reveal its parent clue about dishes
typing dirty
gives
[where dirty dishes pile up] or [exercise in a pool]
Now both parent clues are revealed, so they are both highlighted and solvable.
Clicking a clue reveals the first letter of the answer:
sink or [exercise in a pool (S)]
Clicking twice reveals the answer.
I want a rails backend (where I can manage/create the game for each day) and a frontend where the game is played, in svelte maybe?