- Nix (flakes enabled)
- direnv + nix-direnv (optional, for automatic environment activation)
sh <(curl -L https://nixos.org/nix/install)mkdir -p ~/.config/nix
printf "experimental-features = nix-command flakes\n" >> ~/.config/nix/nix.confFor automatic environment activation when entering the project directory:
# Install direnv
nix profile add nixpkgs#direnv
# Install nix-direnv
nix profile add nixpkgs#nix-direnv
# Configure nix-direnv hook
mkdir -p ~/.config/direnv
echo 'source $HOME/.nix-profile/share/nix-direnv/direnvrc' >> ~/.config/direnv/direnvrc
# Add direnv hook to shell (bash, for other shells see https://direnv.net/docs/hook.html)
echo 'eval "$(direnv hook bash)"' >> ~/.bashrcWith direnv (automatic):
cd songy/
direnv allow
# Environment automatically activated
mix setup
mix phx.serverIf you need Storybook, run it in a separate terminal:
mix storybookWithout direnv (manual):
cd songy/
nix develop
mix setup
mix phx.serverIf you need Storybook, run it in a separate terminal:
mix storybookNow you can visit localhost:4000 from your browser.
By default, the app uses iTunes (no configuration needed) - its rate limits are sufficient for development.
For production or enhanced features, configure one of these providers:
-
Create a new app
-
Add
http://localhost:4000/auth/spotify/callbackto redirect URIs -
Set environment variables:
SPOTIFY_CLIENT_ID=your_client_id SPOTIFY_SECRET_KEY=your_client_secret
Requires Apple Music API developer token:
APPLE_MUSIC_ACCESS_TOKEN=your_access_tokenThis project is dual-licensed:
- GNU AGPL v3 - for open-source and non-commercial use.
- Commercial License - for proprietary use without AGPL restrictions.
The commercial license allows you to:
- Use the software in proprietary products.
- Modify the code without being obligated to share changes.
- Receive priority support.
For details on the commercial license, please contact me.