From 1ce57ac1aa0cfe8fa4b1cf56ddf3e583231ec656 Mon Sep 17 00:00:00 2001 From: Josh Patra <30350506+SoPat712@users.noreply.github.com> Date: Sun, 20 Apr 2025 17:05:18 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 144 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 125 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b5b2950..35cb464 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,144 @@ -# sv +```markdown +# Heardle – Maisie Peters Edition -Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). +**Josh Patra** -## Creating a project +A daily “Heardle”‑style music‑guessing game built with SvelteKit, Tailwind CSS, and the SoundCloud Widget API. Each day, a 2‑second snippet of a Maisie Peters track is unlocked with skips and wrong guesses revealing longer segments until you either guess the song or run out of tries. -If you're seeing this, you've probably already done this step. Congrats! +--- + +## Table of Contents + +1. [Demo](#demo) +2. [Features](#features) +3. [Tech Stack](#tech-stack) +4. [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Installation](#installation) + - [Running Locally](#running-locally) + - [Building for Production](#building-for-production) + - [Deploying to Netlify](#deploying-to-netlify) +5. [Configuration](#configuration) +6. [Project Structure](#project-structure) +7. [Contributing](#contributing) +8. [License](#license) + +--- + +## Demo + +See it in action: +> https://maisie-peters-heardle.joshpatra.me + +--- + +## Features + +- 🎧 **Daily Track**: A new Maisie Peters song every day, chosen deterministically by date. +- ⏱ **Progressive Snippets**: Starts with a 2 s snippet, then 1 s, 2 s, 3 s, 4 s, and finally 5 s until the full track. +- ❌ **Skips & Wrong Guesses**: Skip to unlock the next snippet; wrong guesses also unlock more audio. +- ⏳ **Countdown**: Live countdown timer until the next daily track. +- 🌙 **Dark Mode**: Auto‑detects system preference and can be toggled manually. +- 💾 **No Data Collection**: No analytics or personal data stored. + +--- + +## Tech Stack + +- **[SvelteKit](https://kit.svelte.dev/)** +- **[Tailwind CSS](https://tailwindcss.com/)** +- **[SoundCloud Widget API](https://developers.soundcloud.com/docs/api/html5-widget)** +- **[Svelte Hero Icons](https://github.com/nathanchapman/svelte-hero-icons)** +- **[Moment.js](https://momentjs.com/)** + +--- + +## Getting Started + +### Prerequisites + +- [Node.js](https://nodejs.org/) v16+ +- [npm](https://www.npmjs.com/) v8+ + +### Installation ```bash -# create a new project in the current directory -npx sv create - -# create a new project in my-app -npx sv create my-app +git clone https://github.com/joshpatra/maisie-peters-heardle.git +cd maisie-peters-heardle +npm install ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: +### Running Locally ```bash npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open ``` -## Building +Visit `http://localhost:5173` in your browser. The game will load the SoundCloud widget and pre‑warm the daily snippet. -To create a production version of your app: +### Building for Production ```bash npm run build ``` -You can preview the production build with `npm run preview`. +### Deploying to Netlify -> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. +1. Create a `netlify.toml` with: + ```toml + [build] + command = "npm run build" + publish = ".svelte-kit/output/client" + ``` +2. Push to a Git repository and connect to Netlify. +3. Set the publish directory to `.svelte-kit/output/client`. + +--- + +## Configuration + +- **Artist & User** + In `src/lib/HeardleGame.svelte`: + ```ts + const ARTIST_NAME = 'Maisie Peters'; + const SC_USER = 'maisie-peters'; + ``` +- **Track List** + Edit `const TRACKS_DATA: TrackData[] = [...]` to add, remove, or comment out tracks. +- **Segment Increments** + Adjust `const SEGMENT_INCREMENTS = [2,1,2,3,4,5];` to change snippet lengths. + +--- + +## Project Structure + +``` +. +├── src +│ ├── lib +│ │ └── HeardleGame.svelte # Main game component +│ ├── routes +│ │ ├── +layout.svelte # App layout & global head +│ │ └── +page.svelte # Root page slot +│ └── app.css # Tailwind imports & custom styles +├── netlify.toml # (Optional) Netlify configuration +├── package.json +└── README.md +``` + +--- + +## Contributing + +1. Fork the repository +2. Create a feature branch: `git checkout -b feature/YourFeature` +3. Commit changes: `git commit -m "Add awesome feature"` +4. Push: `git push origin feature/YourFeature` +5. Open a Pull Request + +--- + +## License + +This project is licensed under the MIT License. +``` From 5df9b81298f2bf799d3a4dbb38ac60bd60de9a85 Mon Sep 17 00:00:00 2001 From: Josh Patra <30350506+SoPat712@users.noreply.github.com> Date: Sun, 20 Apr 2025 17:05:56 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 35cb464..8a6cc6a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -```markdown # Heardle – Maisie Peters Edition **Josh Patra** From 1ce67d8c933b347cf637818be3c0946fcbe1fc8f Mon Sep 17 00:00:00 2001 From: Josh Patra <30350506+SoPat712@users.noreply.github.com> Date: Sun, 20 Apr 2025 18:35:51 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8a6cc6a..dd92827 100644 --- a/README.md +++ b/README.md @@ -140,4 +140,3 @@ npm run build ## License This project is licensed under the MIT License. -```