A modern React + TypeScript + Vite web app for DevFest Accra, featuring Progressive Web App (PWA) support for installability and offline access.
- ⚡️ Fast development with Vite
- ⚛️ React 19 + TypeScript
- 🎨 Tailwind CSS for styling
- 🖼️ Custom fonts and icons
- 📱 PWA: Installable on mobile and desktop, works offline
- 🧹 ESLint for code quality
npm installnpm run devnpm run build
npm run previewVisit http://localhost:4173 to preview the production build.
This project uses vite-plugin-pwa for Progressive Web App support.
- The manifest and service worker are auto-generated during build.
- App icons are located in the
public/folder (gdganniverlogo-192.png,gdganniverlogo-512.png). - When opened in a supported browser (Chrome, Edge, Android), users will see an install prompt styled as a modal.
A custom modal appears when the app is eligible for installation, allowing users to install the app for a native-like experience.
See the template notes below for expanding ESLint rules and adding React-specific lint plugins.
src/ # React source code
public/ # Static assets (PWA icons, etc.)
dist/ # Production build output
vite.config.ts # Vite and PWA configuration
- Nelson Dzikunu
- Shadrack Inusah
- Built with React, Vite, and vite-plugin-pwa
- GDG Accra
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
tsconfigRootDir: import.meta.dirname,
},
},
});You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from "eslint-plugin-react-x";
import reactDom from "eslint-plugin-react-dom";
export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
"react-x": reactX,
"react-dom": reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs["recommended-typescript"].rules,
...reactDom.configs.recommended.rules,
},
});