Thank you for your interest in contributing to Analog! We aim to make the contribution process simple and straightforward.
-
Fork the repository
-
Visit Analog repository
-
Click the "Fork" button in the top right
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/analog.git cd analog -
Add upstream remote:
git remote add upstream https://github.com/jeanmeijer/analog.git
-
-
Install dependencies:
bun install
-
Configure environment variables: Copy the example environment file:
cp .env.example .env
Then, open the newly created
.envfile. You will find default values forDATABASE_URLandBETTER_AUTH_URL. You need to set the following:BETTER_AUTH_SECRET: Generate a secure secret by runningopenssl rand -hex 32in your terminal.
-
Set up Google OAuth:
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET:- Create a Google project in the Google Cloud Console.
- Follow step 1 in the Better Auth documentation to set up Google OAuth credentials.
- Enable the Google Calendar API by visiting Google Cloud Console APIs and enabling it for your project.
- Add yourself as test user:
- Locate the Google OAuth
Audiencetab. - Under 'Test users', click on 'Add Users'.
- Add your email(s) in the textbox and click on 'Save'.
- Locate the Google OAuth
- Set up Microsoft OAuth (optional):
MICROSOFT_CLIENT_IDandMICROSOFT_CLIENT_SECRET:- Go to the Microsoft Azure Portal, then navigate to Microsoft Entra ID → App registrations.
- Register a new application and set the redirect URI (
http://localhost:3000/api/auth/callback/microsoft). - Copy the Application (client) ID and create a new client secret under Certificates & secrets.
- Go to API permissions, click + Add a permission, choose Microsoft Graph → Delegated permissions, and add:
Calendars.Read,Calendars.ReadWrite,User.Read,offline_access
- Set up Google Maps API (optional):
GOOGLE_MAPS_API_KEY:- In your existing Google Cloud project (or create a new one), enable the Places API (New) by visiting Google Cloud API Library.
- Create an API key in Google Cloud Maps Platform Credentials.
- Set the API key as
GOOGLE_MAPS_API_KEYin your.envfile.
- Initialize the application
# Initialize the database
bun run db:push
# Start development server
bun run dev-
Create a new branch for your changes
git checkout -b feature/your-feature
-
Make your changes and test them locally
-
Commit your changes using clear conventional commit messages
git commit -m "feat: add new feature" -
Keep your fork up to date
git fetch upstream git merge upstream/main
-
Push changes to your fork
git push origin feature/your-feature
-
Visit your fork on GitHub and create a Pull Request
-
Create a PR with a clear description of your changes
-
Wait for review and address any feedback
If you have questions or need help, please:
- Open an issue
- Comment on the relevant issue or PR
By contributing to Analog, you agree that your contributions will be licensed under its MIT License.