|
| 1 | +# WorkWork Landing Page Template |
| 2 | + |
| 3 | +A modern, fully-featured Vue 3 + TypeScript landing page template with complete component architecture and extensibility. |
| 4 | + |
| 5 | +## 🚀 Features |
| 6 | + |
| 7 | +### Architecture |
| 8 | +- **Vue 3** with Composition API & `<script setup>` |
| 9 | +- **TypeScript** for type safety |
| 10 | +- **Pinia** for state management |
| 11 | +- **Vue Router** for routing |
| 12 | +- **Vite** for fast development and building |
| 13 | + |
| 14 | +### Components |
| 15 | +- **Modular Architecture**: Fully componentized with clear separation |
| 16 | +- **Base Components**: Reusable UI components (Button, Input, Card) |
| 17 | +- **Layout Components**: Header, Footer with responsive navigation |
| 18 | +- **Section Components**: Hero, Features, Products, Team, Stats, Newsletter |
| 19 | +- **Form Handling**: Built-in validation with Composables |
| 20 | + |
| 21 | +### Features |
| 22 | +- ✅ **Fully Responsive** - Mobile-first design |
| 23 | +- ✅ **TypeScript** - Complete type safety |
| 24 | +- ✅ **State Management** - Pinia stores for content and app state |
| 25 | +- ✅ **Form Validation** - Real-time validation with custom composables |
| 26 | +- ✅ **Smooth Animations** - CSS transitions and keyframes |
| 27 | +- ✅ **SEO Optimized** - Meta tags, structured data |
| 28 | +- ✅ **Performance** - Code splitting, lazy loading |
| 29 | +- ✅ **Accessibility** - ARIA labels, keyboard navigation |
| 30 | +- ✅ **Modern CSS** - CSS Grid, Flexbox, custom properties |
| 31 | + |
| 32 | +## 📁 Project Structure |
| 33 | + |
| 34 | +``` |
| 35 | +src/ |
| 36 | +├── components/ |
| 37 | +│ ├── base/ # Reusable UI components |
| 38 | +│ │ ├── BaseButton.vue |
| 39 | +│ │ ├── BaseInput.vue |
| 40 | +│ │ └── BaseCard.vue |
| 41 | +│ ├── forms/ # Form components |
| 42 | +│ │ └── NewsletterForm.vue |
| 43 | +│ ├── layout/ # Layout components |
| 44 | +│ │ ├── AppHeader.vue |
| 45 | +│ │ └── AppFooter.vue |
| 46 | +│ └── sections/ # Page sections |
| 47 | +│ ├── HeroSection.vue |
| 48 | +│ ├── FeaturesSection.vue |
| 49 | +│ ├── ProductsSection.vue |
| 50 | +│ ├── TeamSection.vue |
| 51 | +│ └── StatsSection.vue |
| 52 | +├── composables/ # Vue composables |
| 53 | +│ └── useFormValidation.ts |
| 54 | +├── stores/ # Pinia stores |
| 55 | +│ ├── app.ts |
| 56 | +│ └── content.ts |
| 57 | +├── types/ # TypeScript types |
| 58 | +│ └── index.ts |
| 59 | +├── views/ # Page views |
| 60 | +│ └── HomeView.vue |
| 61 | +├── router/ # Vue Router |
| 62 | +│ └── index.ts |
| 63 | +├── App.vue |
| 64 | +└── main.ts |
| 65 | +``` |
| 66 | + |
| 67 | +## 🛠 Development |
| 68 | + |
| 69 | +### Prerequisites |
| 70 | +- Node.js 16+ |
| 71 | +- npm or yarn |
| 72 | + |
| 73 | +### Setup |
| 74 | +```bash |
| 75 | +# Install dependencies |
| 76 | +npm install |
| 77 | + |
| 78 | +# Copy environment file |
| 79 | +cp .env.example .env |
| 80 | + |
| 81 | +# Start development server |
| 82 | +npm run dev |
| 83 | +``` |
| 84 | + |
| 85 | +### Available Scripts |
| 86 | +```bash |
| 87 | +npm run dev # Start dev server |
| 88 | +npm run build # Build for production |
| 89 | +npm run preview # Preview production build |
| 90 | +npm run type-check # TypeScript type checking |
| 91 | +npm run lint # Lint with ESLint |
| 92 | +npm run format # Format with Prettier |
| 93 | +``` |
| 94 | + |
| 95 | +## 🎨 Customization |
| 96 | + |
| 97 | +### Content Management |
| 98 | +All content is managed through Pinia stores: |
| 99 | +- **`stores/content.ts`** - Page content, navigation, team data |
| 100 | +- **`stores/app.ts`** - App configuration, UI state |
| 101 | + |
| 102 | +### Styling |
| 103 | +- CSS-in-Vue with scoped styles |
| 104 | +- Custom CSS properties for theming |
| 105 | +- Responsive design with mobile-first approach |
| 106 | + |
| 107 | +### Component Extension |
| 108 | +1. Create new components in appropriate folders |
| 109 | +2. Follow existing patterns for props/events |
| 110 | +3. Use TypeScript interfaces from `types/index.ts` |
| 111 | +4. Add to content store if needed |
| 112 | + |
| 113 | +## 🔧 Configuration |
| 114 | + |
| 115 | +### Environment Variables |
| 116 | +Create `.env` file from `.env.example`: |
| 117 | +- `VITE_APP_TITLE` - Application title |
| 118 | +- `VITE_API_URL` - API endpoint |
| 119 | +- `VITE_GA_ID` - Google Analytics ID |
| 120 | + |
| 121 | +### Build Configuration |
| 122 | +- **Vite config**: `vite.config.ts` |
| 123 | +- **TypeScript**: `tsconfig.json` |
| 124 | +- **Path aliases**: `@/*` maps to `src/*` |
| 125 | + |
| 126 | +## 📱 Responsive Design |
| 127 | + |
| 128 | +Breakpoints: |
| 129 | +- `xs`: < 640px |
| 130 | +- `sm`: 640px+ |
| 131 | +- `md`: 768px+ |
| 132 | +- `lg`: 1024px+ |
| 133 | +- `xl`: 1280px+ |
| 134 | +- `2xl`: 1536px+ |
| 135 | + |
| 136 | +## 🚀 Deployment |
| 137 | + |
| 138 | +### Build |
| 139 | +```bash |
| 140 | +npm run build |
| 141 | +``` |
| 142 | + |
| 143 | +### Deploy to Vercel |
| 144 | +```bash |
| 145 | +npm i -g vercel |
| 146 | +vercel --prod |
| 147 | +``` |
| 148 | + |
| 149 | +### Deploy to Netlify |
| 150 | +1. Connect your repo to Netlify |
| 151 | +2. Build command: `npm run build` |
| 152 | +3. Publish directory: `dist` |
| 153 | + |
| 154 | +## 📊 Performance |
| 155 | + |
| 156 | +- **Code Splitting**: Automatic route-based splitting |
| 157 | +- **Tree Shaking**: Unused code elimination |
| 158 | +- **Asset Optimization**: Images and fonts optimized |
| 159 | +- **Lazy Loading**: Components loaded on demand |
| 160 | + |
| 161 | +## 🎯 SEO Features |
| 162 | + |
| 163 | +- Meta tags with dynamic content |
| 164 | +- Structured data (JSON-LD) |
| 165 | +- Semantic HTML |
| 166 | +- Open Graph tags |
| 167 | +- Twitter Card support |
| 168 | +- Canonical URLs |
| 169 | + |
| 170 | +## 🧪 Testing (Optional) |
| 171 | + |
| 172 | +Add testing framework: |
| 173 | +```bash |
| 174 | +# Vitest + Testing Library |
| 175 | +npm i -D vitest @vue/test-utils jsdom |
| 176 | +npm i -D @testing-library/vue @testing-library/jest-dom |
| 177 | +``` |
| 178 | + |
| 179 | +## 📝 Contributing |
| 180 | + |
| 181 | +1. Fork the repository |
| 182 | +2. Create feature branch (`git checkout -b feature/amazing-feature`) |
| 183 | +3. Commit changes (`git commit -m 'Add amazing feature'`) |
| 184 | +4. Push to branch (`git push origin feature/amazing-feature`) |
| 185 | +5. Open Pull Request |
| 186 | + |
| 187 | +## 📄 License |
| 188 | + |
| 189 | +MIT License - see LICENSE file for details |
| 190 | + |
| 191 | +## 🤝 Support |
| 192 | + |
| 193 | +- Create an issue for bugs/features |
| 194 | +- Star the repo if it helps you! |
| 195 | +- Contribute back improvements |
| 196 | + |
| 197 | +--- |
| 198 | + |
| 199 | +**Built with ❤️ using Vue 3 + TypeScript** |
0 commit comments