feat: Add initial project structure and dependencies

This commit introduces the foundational elements of the project:
- `.gitignore` file to exclude build artifacts and environment
  variables.
- `Cargo.lock` and `Cargo.toml` defining project dependencies and
  metadata.
- `diesel.toml` for Diesel CLI configuration.
- Initial migration files (`down.sql`, `up.sql`) for database schema
  setup.
- `rustfmt.toml` for code formatting.
- Basic module structure for database, routes, schema, state, and types.
- `src/main.rs` with basic Axum server setup and dotenv loading.
- `src/routes/system_router.rs` for basic API endpoint.
- `src/state.rs` for managing application state and database connection
  pool.
- Type definitions for Subsonic API responses and extensions.
This commit is contained in:
vaibhav
2026-02-11 04:21:56 +05:30
parent a0c3f5b502
commit 9bf9a2296e
20 changed files with 1424 additions and 0 deletions

34
src/schema.rs Normal file
View File

@@ -0,0 +1,34 @@
// @generated automatically by Diesel CLI.
diesel::table! {
user_music_folders (user_id, music_folder_id) {
user_id -> Integer,
music_folder_id -> Integer,
}
}
diesel::table! {
users (id) {
id -> Nullable<Integer>,
username -> Text,
password -> Text,
email -> Text,
ldapAuthenticated -> Bool,
adminRole -> Bool,
settingsRole -> Bool,
streamRole -> Bool,
jukeboxRole -> Bool,
downloadRole -> Bool,
uploadRole -> Bool,
playlistRole -> Bool,
coverArtRole -> Bool,
commentRole -> Bool,
podcastRole -> Bool,
shareRole -> Bool,
videoConversionRole -> Bool,
}
}
diesel::joinable!(user_music_folders -> users (user_id));
diesel::allow_tables_to_appear_in_same_query!(user_music_folders, users,);