A small, opinionated Vue 3 + Vite + TypeScript application and UI scaffold: internationalized, theme-aware, and built for fast development and testing.
This README documents how to install, run, test, lint, format, and contribute to the project. It also collects a few common troubleshooting tips (especially for ESLint plugin registration) discovered while maintaining the repo.
Table of contents
- About
- Features
- Tech stack
- Prerequisites
- Quick start
- Useful npm scripts
- Project layout
- Local development notes
- Internationalization (i18n)
- Theme (dark/light)
- Testing (unit & e2e)
- Linting & formatting
- Continuous Integration (GitHub Actions)
- Creating a production build
- Contributing
its5oclock is a compact Vue 3 application scaffolded with Vite and TypeScript. It demonstrates a clean component structure (atomic/molecular/organism/template), Tailwind CSS for styling, runtime locale loading, and a small test setup (Vitest + Playwright). Use it as a learning project, a starting template, or a lightweight app skeleton.
- Vue 3 + Composition API + TypeScript
- Vite for dev server and fast builds
- Tailwind CSS for utility-first styling
- Internationalization via
vue-i18nwith JSON locale files undersrc/locales/ - Theme toggle (dark / light) with persistence via
sessionStorage - Unit tests with Vitest, E2E tests with Playwright
- ESLint flat config with TypeScript/Vue/Prettier integration
- Prettier for formatting
- Vue 3
- Vite
- TypeScript
- Tailwind CSS
- vue-i18n
- Vitest (unit)
- Playwright (E2E)
- ESLint + Prettier
- Node.js (see
enginesinpackage.json; this repo targets modern Node — use Node 20+ ornodeto pick latest) - npm (or an equivalent package manager)
- Recommended editor: VS Code + Volar (disable Vetur)
Clone, install, run dev server:
git clone <repo-url> its5oclock
cd its5oclock
npm install
npm run devOpen http://localhost:5173 (or the port Vite reports) to view the app.
These are the main scripts from package.json. Run them from the repo root.
- Start dev server
npm run dev- Build for production
npm run build- Preview a production build locally
npm run preview- Type-check (uses
vue-tsc)
npm run type-check- Unit tests (Vitest)
npm run test:unit- End-to-end tests (Playwright)
npm run test:e2e- Lint (ESLint) — CI prevents warnings via
--max-warnings=0
npm run test:lint- Format check (Prettier)
npm run test:format- Autofix lint and format issues
npm run lint:fix
npm run format:fixsrc/
assets/ # CSS, images, etc (Tailwind entry)
components/ # atoms, molecules, organisms, pages, templates
i18n.ts # vue-i18n bootstrap and runtime message loader
main.ts # app entry
locales/ # JSON locale files (en.json, fr.json, de.json)
.eslint.config.ts # project ESLint flat config (this repo uses eslint.config.ts)
package.json
vite.config.ts
README.md
- TypeScript support for
.vuefiles is handled byvue-tsc. Install and use Volar in VS Code for a smooth DX. - Tailwind is already configured; if you edit Tailwind config or add classes, restart the dev server to pickup changes.
- Translations are in
src/locales/*.json. The runtime loader usesimport.meta.globto eagerly load locale JSON files and builds a messages object. - Default/fallback locale is
en(seesrc/i18n.ts).
- The theme toggle is implemented in the navigation bar and persists a
color-modekey insessionStorage. - On first visit the app respects the user's OS
prefers-color-scheme.
Unit tests (Vitest)
- Run
npm run test:unitto run unit tests. You can pass flags documented by Vitest.
End-to-end tests (Playwright)
- Install Playwright browsers once locally (required to run E2E):
npx playwright install-
On CI, make sure the project is built before running Playwright tests (the CI workflow included in this project runs
npm run buildbefore E2E where needed). -
Run E2E tests:
npm run test:e2e- Lint:
npm run test:lintThis repo's test:lint script runs eslint . --max-warnings=0 and will fail if any warnings or errors are present (useful for CI).
- Format check:
npm run test:format- Autofix:
npm run lint:fix
npm run format:fix- The repo includes
.github/workflows/ci.ymlwhich checks out the code, installs dependencies, runs unit tests, lint and format checks. The workflow usesactions/setup-nodewithnode-version: 'node'so it uses the latest stable Node runtime.
- Commit your changes: Make sure all desired changes are committed to your main branch.
- Create a tag locally:
In your terminal, run:
git tag v1.0.0(Replace v1.0.0 with your desired version.) - Push the tag to GitHub:
Run:
git push origin v1.0.0 - Draft a new release on GitHub:
- Go to your repository on GitHub.
- Click Releases in the sidebar.
- Click Draft a new release.
- Select the tag you just pushed.
- Add a title and description.
- Click Publish release.
- Workflow runs automatically: Your GitHub Actions workflow (.github/workflows/deploy-on-release.yml) will trigger, build your project, and deploy the latest build to the gh-pages branch.
- Please open issues or PRs against
main. - Run the linters, formatters and type-checker before submitting:
npm run lint:fix
npm run format:fix
npm run type-check