Skip to content

Conversation

@DylanDevelops
Copy link
Owner

Introduces a development mode activated by the TMPO_DEV environment variable, which uses a separate database directory (~/.tmpo-dev/) to prevent accidental modification of production data. Updates documentation to explain usage, benefits, and database locations for both production and development modes.

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #36

Description

This pull request adds a development mode to the application, allowing developers to safely test changes without affecting real user data. It introduces the TMPO_DEV environment variable, which switches the database location to a separate directory for development purposes. Documentation has been updated to explain how to use this feature and clarify the differences between production and development modes.

Development mode support:

  • Added logic in internal/storage/db.go to check the TMPO_DEV environment variable; when set to "1" or "true", the application uses the ~/.tmpo-dev/ directory for its database instead of the default ~/.tmpo/ directory. [1] [2]

Documentation updates:

  • Updated CONTRIBUTING.md with a new "Development Mode" section, including usage instructions, database locations, and guidance on making the setting persistent for development.
  • Clarified the storage locations for production and development databases in the "Database Storage" section of CONTRIBUTING.md, and added a reference to the new development mode documentation.

Introduces a development mode activated by the TMPO_DEV environment variable, which uses a separate database directory (~/.tmpo-dev/) to prevent accidental modification of production data. Updates documentation to explain usage, benefits, and database locations for both production and development modes.
@DylanDevelops
Copy link
Owner Author

I think this should be helpful; however, I would have liked development environments to use the development directory by default. I may switch this to an "opt-out" system later on.

To make the switch from opt-in to opt-out, I just need to include steps to set TMPO_DEV=0 when building from source for local production purposes.

@DylanDevelops DylanDevelops merged commit 11483e4 into main Dec 24, 2025
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/better-development-environment branch December 24, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Different storage location for development environment

2 participants