I build this in my spare time. Every star shows that my work is valued and keeps me going!
We use a feature-based, co-located folder strategy.
src/
├── app/ # Application wiring
│ ├── routes/ # React Router v7 route definitions
│ ├── providers/ # Global providers
│ ├── store/ # Redux store configuration
│ └── layout/ # App-level layout
├── pages/ # Route-level screens
│ ├── todo/
│ │ └── index.tsx
│ └── login/
│ └── index.tsx
├── features/ # Feature modules
│ ├── tasks/
│ │ ├── ui/ # TaskCard, TaskList, TaskDetailPanel, etc.
│ │ ├── model/ # todoSlice, todoThunks, todoSelectors
│ │ ├── hooks/ # useTodo, useTodoInit, useTaskDrag
│ │ ├── api/ # firestoreApi
│ │ ├── lib/ # taskUtils, lexoSafe
│ │ ├── types.ts
│ │ └── index.ts # Public API
│ ├── auth/
│ │ ├── ui/
│ │ ├── model/
│ │ ├── hooks/
│ │ ├── api/
│ │ └── index.ts
│ └── calendar/
│ ├── ui/
│ ├── hooks/
│ ├── api/
│ └── index.ts
├── shared/ # Shared resources
│ ├── ui/ # shadcn/ui (after components.json update)
│ ├── hooks/ # useToast, useMediaQuery, etc.
│ ├── animate-ui/ # animate-ui components
│ ├── design-system/ # Glassmorphism primitives
│ ├── lib/ # cn(), helper, etc.
│ ├── api/ # Shared API infrastructure
│ ├── config/ # Environment variables, constants
│ └── types/ # Shared type definitions
└── index.tsx # Entry pointApplication wiring at the root level. This is where the application is assembled: routing definitions, global providers, store setup, and app-wide layout.
-
src/app/routes/React Router v7 route objects live here (the mapping from paths to pages/layouts). -
src/app/providers/Global providers (e.g., Redux<Provider>, router provider, theming, etc.). -
src/app/store/Redux Toolkit store configuration (configureStore), root reducer setup, and app-wide store-related wiring. -
src/app/layout/App-level layout components (application shell, navigation layout, etc.).
Route-level screens. Pages should mainly compose features and shared UI.
Keep business logic/state inside features/.
src/pages/<page>/index.tsxA page entry component. Use a directory per page to co-locate page-only code (small helpers, styles, tests) without leaking it intofeatures/.
Reusable product features (user-facing behavior). Each feature co-locates its Redux logic, API calls, and UI.
A typical feature folder contains:
ui/— feature-specific UI componentsmodel/— Redux Toolkit slice, thunks, selectorsapi/— feature-specific API functionslib/— internal utilities for the featuretypes.ts— feature-local types (optional; createtypes/if it grows)index.ts— feature public API (recommended entry point for imports)
Reusable, non-domain-specific building blocks used across the app.
-
shared/ui/App-wide reusable UI primitives and small wrappers/adapters (including wrappers around third-party UI components such as magic-ui). -
shared/lib/Generic utilities (e.g.,cn(), formatting, validation helpers). -
shared/api/Shared API infrastructure (fetch wrapper, base client configuration, etc.). -
shared/hooks/Reusable React hooks (e.g.,useToast,useMediaQuery,useLocalStorage). -
shared/config/App configuration, constants, environment wrappers. -
shared/types/Cross-cutting types shared by multiple features.
pagesmay import fromfeaturesandshared.featuresmust not import frompages.- Avoid importing directly from other
features. Prefer composition inpages, or move truly generic parts intoshared. - Prefer importing from a feature's
index.ts(public API) instead of deep paths.
@/app/*@/pages/*@/features/*@/shared/*
This template includes Tauri's auto-update functionality and GitHub release notes integration. After forking, configure the following:
| Secret Name | Description |
|---|---|
TAURI_SIGNING_PRIVATE_KEY |
Private key for signing updates |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD |
Password for the private key (if set during key generation) |
src-tauri/tauri.conf.json- Setplugins.updater.pubkeyand updateendpointsURL with your repository pathREADME.md- Replace<owner>/<repo>in badge URLs
For local development, create a .env file in the project root:
# .env
GITHUB_OWNER=your-username
GITHUB_REPO=your-repo-nameThis enables fetching GitHub release notes during development. In production, these values are automatically provided by GitHub Actions.
Important: The .env file is for local development only. It is not
included in production builds. Ensure GitHub Actions workflows can access
repository information (automatically configured in .github/workflows/release.yml).
- Tauri Updater Plugin - Key generation and configuration
- GitHub Actions - CI/CD setup
- Update version in
package.json,src-tauri/tauri.conf.json, andsrc-tauri/Cargo.toml - Create and push a tag:
git tag v0.1.0 && git push origin v0.1.0 - GitHub Actions builds and creates a draft release
- Review and publish the release on GitHub
