TreeMap
A free, open-source disk-space visualizer. Squarified treemap, duplicate hunting, disk-full forecasting, and cleanup that only ever moves files to the Trash.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證A calendar app for tracking habits, built with React and Supabase
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗
Habitrack is a simple and intuitive web app designed for logging habits and v isualizing them on a calendar view.
This app showcases the use of the following tools and technologies:
There's also a public roadmap on Featurebase where you can upvote and suggest new features: Habitrack Public Roadmap.
Follow these steps to get the project up and running on your local machine.
Clone the repository:
git clone https://github.com/domhhv/habitrack.git
Navigate to the project directory:
cd habitrack
Install dependencies:
yarn install
The project uses Supabase for database operations.
The Supabase project configuration, seeds, and migrations live under the supabase directory.
To set up a local Supabase instance, run the following commands (Docker required).
Start the local Supabase instance:
yarn db:start
This command starts Supabase Docker containers based on supabase/config.toml and creates a local Postgres database and services.
It should output the Studio URL, Database URL, and Project URL, among other info. Use the Studio URL to access the local Supabase dashboard in the browser, and the Database URL to connect to the local database directly if needed.
Retrieve the API URL and keys:
Run the following command to retrieve the API URL and keys for the local Supabase instance:
yarn db:status -o env
This command outputs the environment variables needed to connect to the local Supabase instance, including API_URL, PUBLISHABLE_KEY and SECRET_KEY.
Environment variables
Create a .env.development file in the root directory of the project and add the following environment variables:
SUPABASE_URL=<API_URL>
SUPABASE_PUBLISHABLE_KEY=<PUBLISHABLE_KEY>
SUPABASE_SECRET_KEY=<SECRET_KEY>
The publishable key ships to the browser, and Row Level Security protects the data. The secret key bypasses Row Level Security, so only server-only code reads it. Nothing uses it yet, so it's optional for now.
Apply migrations and seed the database:
yarn db:reset
This command resets the local database to a clean state, applies migrations from supabase/migrations, and seeds the db with essential initial data based on supabase/seed.sql.
Once the dependencies are installed and the local Supabase instance is running, you can run the app locally:
yarn dev
This command starts the development server and opens the app in your default browser.
There are a few ways to create and run migrations in the project.
supabase/schemas directory as neededThis project uses declarative database schema management, so the preferred way to make changes to the database schema is to modify the SQL files under supabase/schemas directory.
If you need to modify an existing table, add a new table/type/function, or make any other schema changes, do so by editing or adding SQL files in the supabase/schemas directory, then run:
yarn db:diff -f <your-migration-name>
Do the necessary changes in the local Supabase studio and then run the following to automatically generate a new migration file:
yarn db:diff -f <your-migration-name>
To create a new migration file manually, run the following command:
yarn db:migration:new <your-migration-name>
Either way, the new migration file will be created in the supabase/migrations directory. Write/change the SQL queries in the migration file to reflect the changes you want to make to the database schema. Then, apply the migration by running:
yarn db:migration:up # or
yarn db:reset # to reset the local DB and apply all migrations
After applying the migration, you also need to regenerate Supabase types by running:
yarn db:gen-types
Once the migration ends up in the main branch, it will be automatically applied to the production database.
Important step: After applying any new migrations, always remember to regenerate Supabase types by running
yarn db:gen-typesto keep the types in sync with the database schema.
The project uses Vitest as the test runner and React Testing Library for unit testing of React components.
To run the tests, use the following command:
yarn test
Other test-related commands include:
yarn test:coverage # Run all tests and generate coverage report
yarn test:watch # Run all tests in watch mode
yarn test:no-cache # Run all tests without cache
There are two types of linting in the project: JavaScript/TypeScript linting and SQL linting.
The project uses ESLint v10 with a custom flat config for linting. To run ESLint, use the following command:
yarn eslint:check # Check for linting errors
yarn eslint:fix # Fix linting errors
In addition to ESLint, the project uses SQLFluff for linting SQL queries under supabase directory. To run SQLFluff (Docker required), use the following command:
yarn lint:sql # Lint SQL queries
yarn fix:sql # Find fixable linting violations in SQL queries and apply fixes
The project uses Prettier for formatting. To run Prettier, use the following command:
yarn prettier:check # Check for formatting errors
yarn prettier:write # Fix formatting errors
To create a local production-like build of the app, run the following command:
yarn build
You can run the production build locally using the following command:
yarn preview
The project uses GitHub Actions for CI/CD.
When you open a pull request, the following checks are run:
All checks but the last one must pass before merging a pull request.
When a pull request is merged to the main branch, the following checks are run:
Contributions are welcome! Feel free to open issues or pull requests for any improvements, bug fixes, or new features.