Click the image for a video demonstration!
Or, try out the web app version here!
Spindex is an app for cataloging your analogue music collection - built by a vinyl lover, for vinyl lovers. Gone are the days of accidently purchasing a second copy of an album you already own! Create wish lists, manage your collection, and show off your favorites.
Spindex is a cross-platform mobile application built using Flutter, a UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase. This app leverages the power of Firebase to provide backend services such as authentication, database, cloud storage, and serverless functions. Additionally, it integrates with the Discogs API to fetch music-related data, and the OpenAI API for image processing and metadata extraction.
- Cross-Platform: Runs seamlessly on both iOS and Android devices.
- Firebase Integration:
- Authentication: Secure user sign-in and sign-up, as well as password reset emails.
- Cloud Firestore: Real-time database for storing and syncing user data.
- Cloud Storage: For managing and storing user-uploaded files.
- Remote Configuration: Store API keys safely and load them dynamically - no need to hard code secrets into your app.
- Firebase Functions: Used to proxy API requests and mitigate CORS issues when interacting with external APIs like Discogs.
- Discogs API Integration: Fetch detailed music metadata, including album art, track lists, and artist information.
If you want to build Spindex on your own machine, you can follow these instructions to get started. Note: You will need to deploy your own Firebase function and modify the files to include your own Firebase project identifiers, as well as your own configuration for Discogs and OpenAI API keys.
- Install Flutter on your machine.
- Set up your Flutter environment for iOS and/or Android.
- Ensure you have a Firebase project set up with the necessary services enabled.
- Familiarize yourself with the FlutterFire documentation for integrating Firebase with Flutter.
- Clone the repository:
git clone https://github.com/yourusername/spindex.git cd spindex - Install dependencies:
flutter pub get
- Configure Firebase:
- Download the
google-services.jsonfile for Android and place it in theandroid/appdirectory. - Download the
GoogleService-Info.plistfile for iOS and place it in theios/Runnerdirectory. - Important: These files contain sensitive information and should not be committed to version control. Ensure they are listed in your
.gitignorefile. - Replace the project ID in
.firebasercwith your own
- Download the
- Configure API Keys:
- Add your Discogs API key and OpenAI API key to a secure location. You can configure these keys in Firebase Remote Config for added security and dynamic updates.
- Update your app to fetch these keys from Firebase Remote Config at runtime. Refer to the FlutterFire Remote Config documentation for guidance.
- Alternatively, you can use environment variables or a secure configuration file if Remote Config is not an option.
- Deploy Firebase Functions:
- configure your environment variables for use in the function by creating this file:
functions/.envwith your discogs key and secret:DISCOGS_KEY="< Your Discogs Key >" # from discogs.key DISCOGS_SECRET="< Your Discogs Secret >" # from discogs.secret - Modify the index.html file to use a unique application identifier for your project to control rate limiting with Discogs
- Navigate to the
functionsdirectory:cd functions - Install dependencies:
npm install
- Deploy the functions:
firebase deploy --only functions
- configure your environment variables for use in the function by creating this file:
Note: If you, like me, inevitably leak an API key or two, make sure to reset them with their respective services, and then use a handy tool like bfg to clean up files or keys from your git history.
- Run the app on an emulator or connected device:
flutter run
- For specific platforms:
- iOS: Ensure you have Xcode installed and run:
flutter run -d ios
- Android: Ensure you have an Android emulator or device connected and run:
flutter run -d android
- iOS: Ensure you have Xcode installed and run:
To ensure sensitive files are not committed to version control, make sure the following entries remain in your .gitignore file:
# Firebase configuration files
android/app/google-services.json
ios/Runner/GoogleService-Info.plist
functions/.runtimeconfig.json
# Environment files
.env*
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, feel free to reach out at matt@latterarrays.com.