Yggdrasil is a web application for managing and editing audio files on a server. Built with Svelte on the frontend and Go on the backend, it allows users to edit metadata of songs and upload new audio files to the server.
- Upload audio files to server storage ( WIP )
- Edit metadata of existing audio files (artist, title, album, etc.)
- Browse and search through your audio collection
All included in the Nix flake used for development.
# From the project root
go run main.goThe Go server will start on port 8080.
# From the project root
cd frontend
npm install
npm run devThe Vite development server will start on port 3000. During development, API requests to /api will be automatically proxied to localhost:8080/.
A configuration file will be added in the future.
The application is designed to be deployed behind a reverse proxy (e.g., Nginx). The reverse proxy should:
- Serve the Svelte frontend on the root path (
/) - Proxy requests to
/apito the Go backend
- Frontend: 3000
- Backend API: 8080
server {
listen 80;
server_name yourdomain.com;
# Serve frontend static files
location / {
root /path/to/frontend/dist;
index index.html;
try_files $uri $uri/ /index.html; # For SPA routing
}
# Proxy API requests
location /api {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}In production, the Vite server is not used to serve the frontend. Instead:
- Build the Svelte app with
npm run buildin the frontend directory - Serve the static files from the
frontend/distdirectory - Configure your reverse proxy to route API requests to the Go server
PORT: Port for the Go server (default: 8080)STORAGE_PATH: Path where audio files will be stored (default: "./storage")
PORT: Port for the development server (default: 3000)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request