https://github.com/capitec/template-pwa-react
PWA starter template for React-based SPA development.
https://github.com/capitec/template-pwa-react
Last synced: 3 days ago
JSON representation
PWA starter template for React-based SPA development.
- Host: GitHub
- URL: https://github.com/capitec/template-pwa-react
- Owner: capitec
- License: mit
- Created: 2023-03-28T12:11:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T10:40:20.000Z (over 2 years ago)
- Last Synced: 2025-02-23T10:41:25.036Z (over 1 year ago)
- Language: TypeScript
- Size: 2.88 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
Progressive Web App starter template for [React](https://react.dev/)-based Single-page application (SPA) development, leveraging various [Omni](https://github.com/capitec?q=omni-) libraries
# Usage
1️⃣ Create a new [repository from this template](https://github.com/capitec/template-pwa-react/generate) (or fork) and clone locally:
```bash
git clone https://github.com/{your-repo-name}.git
cd {your-repo-name}
```
2️⃣ Restore all package dependencies:
```bash
npm i
```
3️⃣ Open it in VS Code:
```bash
code .
```
# Scripts
The following NPM scripts within `package.json` should be noted:
- `serve` - Launches dev server
- `build` - Bundles code and copies artifacts for production from the `src` directory to the `build` directory.
- `preview` - Launches a simple web server, serving the `build` directory (Remember to `build` first! 🎗️).
- `test` - Launches the Playwright test runner & executes all tests within `tests` directory.
- `format` - Runs the Prettier formatter on all `.ts` and `.tsx` files, applying format updates where necessary.
# Features
| Feature | Availability | Description |
|-------------------------------|-----|-----------------------------------------------------------------|
| Components | ✅ | [Omni Components](https://github.com/capitec/omni-components) |
| Component Intellisense | ✅ | |
| Routing | ✅ | [React](https://react.dev) |
| VS Code Debugging | ✅ | [.vscode/launch.json](./.vscode/launch.json) (Opens up a second browser instance) |
| Tests | ✅ | [Playwright](https://playwright.dev/) |
| Serve | ✅ | [react-scripts](https://www.npmjs.com/package/react-scripts) |
| Build | ✅ | [react-scripts](https://www.npmjs.com/package/react-scripts) |
| Build chunking | ✅ | `/* webpackChunkName: */` compiler hints |
| Preview built output | ✅ | [http-server](https://github.com/http-party/http-server) |
| Formatting | ✅ | [Prettier](https://prettier.io/) |
| Linting | ❌ | Not available |