diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b745e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +.env \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index fbf0257..3398ac8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -276,6 +276,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", + "domain", "rand 0.10.0", "reqwest", "serde", diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8ab70c0 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +MIT \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..86deea3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# PocketChords + +A rip-off of [TabsUltimate](https://www.tabultimateguitar.com/) with a focus on mobile users, without any ads or subscription. It is open source and free to use. diff --git a/app/app/app.css b/app/app/app.css index c93d0fd..c6cb28a 100644 --- a/app/app/app.css +++ b/app/app/app.css @@ -6,8 +6,9 @@ @custom-variant dark (&:is(.dark *)); @theme { - --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-sans: + "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } html, @@ -21,7 +22,7 @@ body { @theme inline { --font-heading: var(--font-sans); - --font-sans: 'Inter Variable', sans-serif; + --font-sans: "Inter Variable", sans-serif; --color-sidebar-ring: var(--sidebar-ring); --color-sidebar-border: var(--sidebar-border); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); @@ -141,4 +142,4 @@ body { html { @apply font-sans; } -} \ No newline at end of file +} diff --git a/app/app/lib/mock.ts b/app/app/lib/mock.ts deleted file mode 100644 index 422bdf7..0000000 --- a/app/app/lib/mock.ts +++ /dev/null @@ -1,128 +0,0 @@ -import type { Song, SongSummary } from "./types"; -import { previewChords } from "./song-utils"; - -const OCEAN: Song = { - meta: { - title: "A Drop In The Ocean", - artist: "Ron Pope", - capo: null, - original_key: "Em", - tuning: null, - tempo: null, - }, - sections: [ - { - kind: "chorus", - label: "Chorus", - lines: [ - { - text: "A drop in the ocean,", - chords: [{ offset: 0, chord: "Em" }, { offset: 12, chord: "C" }], - }, - { - text: "A change in the weather,", - chords: [{ offset: 2, chord: "G" }, { offset: 16, chord: "D" }], - }, - { - text: "I was praying that you and me might end up together.", - chords: [ - { offset: 6, chord: "Em" }, - { offset: 17, chord: "C" }, - { offset: 33, chord: "G" }, - { offset: 44, chord: "D" }, - ], - }, - ], - }, - { - kind: "verse", - label: "Verse", - lines: [ - { - text: "I don't wanna waste the weekend,", - chords: [{ offset: 0, chord: "C" }, { offset: 15, chord: "G" }], - }, - { - text: "If you don't love me, pretend", - chords: [{ offset: 3, chord: "D" }, { offset: 21, chord: "Em" }], - }, - { - text: "A few more hours, then it's time to go.", - chords: [{ offset: 2, chord: "C" }, { offset: 18, chord: "G" }, { offset: 30, chord: "D" }], - }, - ], - }, - { - kind: "bridge", - label: "Bridge", - lines: [ - { - text: "Still I can't let you be,", - chords: [{ offset: 0, chord: "Am" }, { offset: 11, chord: "G" }, { offset: 13, chord: "D" }], - }, - ], - }, - ], -}; - -const NAKED: Song = { - meta: { - title: "Naked", - artist: "James Arthur", - capo: null, - original_key: "G", - tuning: null, - tempo: null, - }, - sections: [ - { - kind: "chorus", - label: "Chorus", - lines: [ - { - text: "I'm not going to wait until you're done", - chords: [{ offset: 0, chord: "G" }, { offset: 18, chord: "Bm" }], - }, - { - text: "Pretending you don't need anyone", - chords: [{ offset: 16, chord: "Em" }, { offset: 27, chord: "C" }], - }, - { - text: "I'm standing here naked", - chords: [{ offset: 19, chord: "G" }], - }, - ], - }, - { - kind: "verse", - label: "Verse", - lines: [ - { - text: "I lay awake thinking of all I wasted", - chords: [{ offset: 0, chord: "G" }, { offset: 22, chord: "Bm" }], - }, - { - text: "All of the time we had I took for granted", - chords: [{ offset: 11, chord: "Em" }, { offset: 32, chord: "C" }], - }, - ], - }, - ], -}; - -const SONGS_MAP: Record = { - "song-ocean": OCEAN, - "song-naked": NAKED, -}; - -export const MOCK_SONGS: SongSummary[] = Object.entries(SONGS_MAP).map( - ([id, song]) => ({ - id, - meta: song.meta, - preview_chords: previewChords(song), - }) -); - -export function getMockSong(id: string): Song | null { - return SONGS_MAP[id] ?? null; -}