A SvelteKit application for survey management.
Read the project overview here.
Kanban here.
Before starting, make sure you have the following tools installed:
fnm or nvm to manage Node.js versions
npm install -g pnpmgit clone [email protected]:rxtsel/encustapp.git
cd encustapp
This project uses a specific Node.js version defined in .node-version.
Using fnm (recommended):
fnm use
Using nvm:
nvm use
If the Node.js version is not installed, install it first:
With fnm:
fnm install
fnm use
With nvm:
nvm install
nvm use
pnpm install
Copy the environment example file and configure it with your actual values:
cp .env.example .env
Fill in other required environment variables with your actual configuration values.
This project uses SQLite as the database.
The database file will be automatically created in the project root when you run pnpm run dev command.
First time setup:
# Option 1: Push schema directly (recommended for development)
pnpm run db:push
# Option 2: Generate and run migrations
pnpm run db:generate
pnpm run db:migrate
pnpm run dev
The application will be available at http://localhost:5173 (or the port shown in your terminal).
This project uses Git Flow methodology with the following branches:
feature/user-authentication)Create feature branches from develop:
git checkout develop
git pull origin develop
git checkout -b feature/your-feature-name
Work on your feature and commit changes
Push your feature branch:
git push origin feature/your-feature-name
Create a Pull Request to merge into develop
After review and approval, the feature will be merged
This project uses Conventional Commits specification. We have tools to help enforce this:
This project enforces Conventional Commits specification. You have two options for making commits:
Option 1 - Using Commitizen (Recommended):
git add .
pnpm run commit
This will launch commitizen which will guide you through:
Option 2 - Manual commits:
git add .
git commit -m "feat: add user authentication"
Manual commits must follow the conventional format or they will be rejected by commit hooks.
Using Git UI tools (lazygit, GitKraken, etc.):
If you use GUI tools like lazygit, write your commit messages manually following the conventional format. The commit-msg hook will validate the format automatically.
If not using git cz, follow this format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the coderefactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary toolsExamples:
feat: add user authentication
fix: resolve login validation issue
docs: update README with setup instructions
chore: update dependencies
The project uses lefthook to automatically run quality checks:
Pre-commit hooks:
Commit message hooks:
Pre-push hooks:
These hooks are automatically installed when you run pnpm install thanks to the prepare script.
pnpm run dev - Start development serverpnpm run check - Run type checkingpnpm run format - Format code with Prettierpnpm run lint - Lint code with ESLintpnpm run commit - Create a commit using Commitizenpnpm run db:push - Push database schemapnpm run db:generate - Generate database migrationspnpm run db:migrate - Run database migrationspnpm run db:studio - Open database studiopnpm run db:seed - Populate database with test datapnpm run db:reset - Reset database (clear all data)