Skip to content

swayam25/Aero

Repository files navigation

Aero

Aero

Aero makes listening to music feel light and breezy

Svelte Tailwind CSS Supabase Drizzle ORM

📸 Preview

Desktop

Desktop Preview

Mobile
Mobile Homepage Mobile Player
Mobile Homepage Mobile Player

🚩 Installation

  1. Clone this repository

    git clone https://github.com/swayam25/Aero aero
    cd aero
  2. Install dependencies

    pnpm i
  3. Create an application at the Discord Developer Portal. New Application

  4. Create .env file from .env.example in the root directory and fill in the required values.

    ENV Vars
    • Get DATABASE_URL from Supabase. Click on the Connect Button button at the top bar. Supabase DB URL
    • Get VITE_SUPABASE_URL and VITE_SUPABASE_KEY from Supabase API Settings. Supabase API Supabase Publishable Key
    • Get JWT_SECRET by running the following command.
      pnpm run gen-secret
    • Get DISCORD_CLIENT_ID and DISCORD_CLIENT_SECRET from the Discord Developer Portal. Client Info
    • Get DISCORD_BOT_TOKEN from the Discord Developer Portal. Bot Token
    • Get SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET from the Spotify Developer Dashboard.
      • Create a new application and fill in the required details.
      • Set Redirect URI to http://localhost (we don't need it, but Spotify requires it to be set).
      • Select the API scopes required for the app. Spotify App
      • Copy the Client ID and Client Secret. Spotify Client Info
    • Set YOUTUBE_DL_PATH to the path of youtube-dl or yt-dlp executable. You can install it from GitHub Releases (yt-dlp) or use a package manager.
    • Set DOMAIN to your domain name or https://localhost for local development. The variable is required for production.
      DOMAIN="https://your-domain.com"
  5. Add redirect url at the Discord Developer Portal. Discord Developer Portal

  6. Push the database schema to Supabase.

    pnpm run db:push
  7. Navigate to Table Editor in Supabase Dashboard and enable RLS for all the tables.

  8. Navigate to Authentication > Policies in Supabase Dashboard and create policies for all the tables. Policies

  9. Navigate to Table Editor in Supabase Dashboard and enable Realtime for playlist, room & room_member table. Playlist Realtime

Note

Check the Supabase Docs for more information on enabling Realtime.

  1. Start the app
    pnpm run dev

🚀 Production

  1. Follow steps 1-10 from the installation section.

  2. Change DOMAIN in .env file to your domain name.

    DOMAIN="https://your-domain.com"

Important

DOMAIN is the URL you will use to access the app. This dynamically sets ORIGIN during node build and configure the Caddy server's domain (for the reverse proxy). For local development, you can set it to https://localhost. Ensure this matches the Redirect URL in the Discord Developer Portal (see step 5 in the installation section).

Check the SvelteKit Docs for more information about the ORIGIN variable.

  1. Run docker container (via docker compose)
    docker compose up -d

❤️ Contributing

  • Things to keep in mind

    • Follow our commit message convention.
    • Write meaningful commit messages.
    • Keep the code clean and readable.
    • Make sure the app is working as expected.
  • Code Formatting

    • Run pnpm run format before committing your changes or use Prettier extension in your code editor.
    • Make sure to commit error free code. Run pnpm run check to check for any errors.
  • Check STYLES.MD for the CSS style guide.

About

Aero makes listening to music feel light and breezy

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •