A modern full-stack todo application built with Vue 3, Node.js, TypeScript, and SQLite. This project serves as a starter template for building full-stack web applications with a clean separation of concerns and modern development practices.
- Frontend: Vue 3 with Composition API and TypeScript
- Backend: Node.js with Express and TypeScript
- Database: SQLite with better-sqlite3
- Styling: Tailwind CSS for responsive design
- State Management: Pinia for frontend state
- HTTP Client: Axios for API communication
- Build Tools: Vite (frontend) and esbuild (backend)
- Monorepo: Managed with npm workspaces
- Type Safety: TypeScript support across all layers with a
/shared/folder
- Node.js (v16 or higher)
- npm (v7 or higher for workspaces support)
-
Clone the repository
git clone https://github.com/ProjectDepot/vue-node-sqlite-starter cd vue-node-starter -
Install dependencies
npm run install:all
-
Start development servers
npm run dev
This will start both the client and server in development mode:
- Frontend: http://localhost:3000
- Backend: http://localhost:4000
- API: http://localhost:4000/api/todos
A documentation site is available, built with Vitepress.
- Local Development:
npm run docs:dev(opens at http://localhost:5174) - Production Build:
npm run docs:build
vue-node-sqlite-starter/
├── client/ # Vue 3 frontend
│ ├── src/
│ │ ├── components/ # Vue components
│ │ ├── App.vue
│ │ └── main.ts
│ ├── package.json
│ └── vite.config.ts
├── server/ # Node.js backend
│ ├── src/
│ │ ├── routes/ # API routes
│ │ ├── database.ts # SQLite setup
│ │ └── index.ts # Server entry point
│ └── package.json
├── shared/ # Shared code and types
│ ├── src/
│ │ ├── types.ts # Shared TypeScript interfaces
│ │ └── index.ts
│ └── package.json
├── docs/ # Documentation site (VitePress)
│ ├── .vitepress/
│ │ └── config.mts # VitePress configuration
│ ├── index.md # Documentation homepage
├── package.json # Root workspace configuration
└── README.md
npm run dev- Start both client and server in development modenpm run dev:client- Start only the client development servernpm run dev:server- Start only the server in development modenpm run build- Build all workspaces for productionnpm run build:client- Build only the clientnpm run build:server- Build only the servernpm run build:shared- Build only the shared packagenpm run install:all- Install dependencies for all workspacesnpm run clean- Clean build artifactsnpm start- Start the production server
npm run docs:dev- Start VitePress development servernpm run docs:build- Build documentation for productionnpm run docs:preview- Preview production build locally
Create a .env file in the root directory for environment-specific configuration:
# Server Configuration
PORT=4000
NODE_ENV=development
# Database Configuration
DATABASE_URL=todos.db
# CORS Configuration
CLIENT_URL=http://localhost:3000-
Build the application
npm run build
-
Start the server
npm start
All 3 parts (client, server, shared) are built to and served from /dist/.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.