This guide will help you set up the development environment for the 5ire project and run it locally.
git clone https://github.com/nanbingxyz/5ire.git
cd 5ireWe recommend using asdf for managing Node.js versions. If you have asdf installed:
# Install the required Node.js version
asdf install nodejs 20.10.0
# Set it as the local version for this project
asdf local nodejs 20.10.0Alternatively, you can install Node.js v20.10.0 directly from the official website.
depend on you shell
source venv/bin/activate.fishnpm installCreate a .env file in the root directory with the following variables:
SUPA_PROJECT_ID=your_supabase_project_id
SUPA_KEY=your_supabase_anon_key
AXIOM_TOKEN=your_axiom_token
AXIOM_ORG_ID=your_axiom_org_id
NODE_ENV=development
We utilize Axiom to collect anonymized minimal operational metrics and Supabase for authorization and backing up settings. If these features aren't involved during development, you can just ignore them and use a dummy.env config.
To get your Axiom credentials:
- Create an Organization on Axiom
- Get Organization ID from Org Settings.
- Create a new API Token in the organization settings.
To get your Supabase credentials:
- Create a project on Supabase
- Go to Project Settings > API
- Copy the Project URL - the project ID is the subdomain (e.g., for
https://xvmubowipwszxgjskdme.supabase.co, the ID isxvmubowipwszxgjskdme) - Copy the
anonpublic API key for theSUPA_KEYvariable
npm run preparenpm start -- --no-sandbox --disable-gpuThis command will:
- Start the Electron application in development mode
- Enable hot reloading for changes to the codebase
- Open the application window
The application uses Model Context Protocol (MCP) tool servers for various functionalities. These are optional for basic development but required for full functionality.
If you see errors like:
Error: MCP error -1: Connection closed
You may need to set up the relevant MCP tool servers. Check the project documentation for specific MCP tools used.
If you see errors related to Supabase authentication:
- Verify your
SUPA_PROJECT_IDandSUPA_KEYin the.envfile - Ensure your Supabase project is running and accessible
- Check that you're using the correct API key (the
anonpublic key for development)
If you encounter compatibility issues:
# Check your current Node.js version
node -v
# If using asdf, ensure the correct version is active
asdf current nodejsIf the application fails to start:
-
Try running without sandbox and GPU acceleration:
npm start -- --no-sandbox --disable-gpu
-
Check the console output for specific errors
- Make your code changes
- The application will automatically reload with your changes
- For changes to the main process, you may need to restart the application
npm run packageThis will create a distributable package in the release/build directory.
A big thanks to @cs3b for helping with this document.