Skip to content

Commit 0db20a9

Browse files
committed
update readme's
1 parent f87dddf commit 0db20a9

File tree

6 files changed

+168
-35
lines changed

6 files changed

+168
-35
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All starters are designed to be easily extensible and customizable, allowing dev
66

77
## Available Starters
88
- **ssr-daisyui**: A starter template for server-side rendering (SSR) with DaisyUI components.
9+
- **csr-daisyui**: A starter template for client-side rendering (CSR) with DaisyUI components.
910

1011
## Getting Started
1112

@@ -14,6 +15,9 @@ To get started with any of the starters, use `create-react-router` and reference
1415
```bash
1516
# ssr-daisyui
1617
npx create-react-router@latest --template https://github.com/tegonal/react-router-templates/tree/main/packages/ssr-daisyui
18+
19+
# csr-daisyui
20+
npx create-react-router@latest --template https://github.com/tegonal/react-router-templates/tree/main/packages/csr-daisyui
1721
```
1822

1923
Then, follow the instructions of `create-react-router` to set up your project.
@@ -49,4 +53,23 @@ Arguments that can help you decide between SSR and CSR:
4953
- **Development Experience**: If you are more comfortable with client-side rendering and have experience with it, CSR may be a better choice.
5054
- **Ecosystem**: If you are already using a lot of client-side libraries and frameworks, switching to SSR might require a bit of mental gymnastics.
5155

52-
In the end, both SSR and CSR have their pros and cons and both approaches can be used to create the same application and features. If you feel more comfortable with one approach over the other, this could be an additional argument to base a decision on. As always, it depends.
56+
In the end, both SSR and CSR have their pros and cons and both approaches can be used to create the same application and features. If you feel more comfortable with one approach over the other, this could be an additional argument to base a decision on. As always, it depends.
57+
58+
## But I want Shadcn UI because DaisyUI is not my jam! :`(
59+
60+
If you need more complex components, have a look at any headless UI library that provides good accessibility and style the components using daisyUI theme definitions and classes.
61+
62+
For example:
63+
64+
- **[Radix UI](https://www.radix-ui.com/)** - you can easily modify most Shadcn UI components because they heavily rely on Radix UI components. Copy them over, install the radix components they require and style them using daisyUI classes.
65+
- **[Headless UI](https://headlessui.dev/)** - Another great library that provides unstyled, fully accessible UI components designed to integrate beautifully with Tailwind CSS.
66+
- **[React Aria](https://react-spectrum.adobe.com/react-aria/)** - React components that provide accessible UI primitives for your design system.
67+
68+
For more specific and advanced components like date pickers, sliders, you can refer to the ones utilised by ShadCN UI and style them easily to fit your needs.
69+
70+
Or you rip out the DaisyUI theme and replace it with Shadcn UI theming and components. This is a bit more work but still possible. We suggest starting with DaisyUI and implementing headless components gradually, as needed, styling them on the go.
71+
72+
Another great option depending on your use case is [PrimeReact](https://primereact.org), which also comes with its own theme.
73+
74+
## Contributing
75+
We welcome contributions to this project! If you have suggestions, improvements, or bug fixes, please feel free to open an issue or submit a pull request.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build application on commit
2+
on:
3+
workflow_call:
4+
pull_request:
5+
push:
6+
paths:
7+
- '**'
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 22
19+
- name: Trying to install dependencies and build the application
20+
run: |
21+
yarn --version
22+
yarn install
23+
yarn run build
24+
25+
# notify:
26+
# needs: build
27+
# if: always()
28+
# runs-on: ubuntu-latest
29+
# steps:
30+
# - name: Set Status Message
31+
# id: set_status
32+
# shell: bash
33+
# run: |
34+
# if [ "${{ needs.build.result }}" == "success" ]; then
35+
# echo "STATUS_MESSAGE=Successfully built the app for the latest commit on main :white_check_mark:" >> $GITHUB_ENV
36+
# else
37+
# echo "STATUS_MESSAGE=:boom: :boom: :boom: Building the app based on the latest commit on main failed, more information is available in the GitHub action logs." >> $GITHUB_ENV
38+
# fi
39+
#
40+
# - name: Mattermost Notification
41+
# uses: mattermost/action-mattermost-notify@master
42+
# with:
43+
# MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
44+
# TEXT: |
45+
# This is a message from ${{ github.repository }}.
46+
# [Pipeline](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}): ${{ env.STATUS_MESSAGE }}
47+
# MATTERMOST_USERNAME: ${{ github.triggering_actor }}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build and publish docker images
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
attestations: write
19+
id-token: write
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Log in to the Container registry
25+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata (tags, labels) for Docker
32+
id: meta
33+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
34+
with:
35+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36+
37+
- name: Build and push Docker image
38+
id: push
39+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
46+
# notify:
47+
# needs: build-and-push
48+
# if: always()
49+
# runs-on: ubuntu-latest
50+
# steps:
51+
# - name: Set Status Message
52+
# id: set_status
53+
# shell: bash
54+
# run: |
55+
# if [ "${{ needs.build-and-push.result }}" == "success" ]; then
56+
# echo "STATUS_MESSAGE=Successfully built and pushed the docker image ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.labels }} :white_check_mark:" >> $GITHUB_ENV
57+
# else
58+
# echo "STATUS_MESSAGE=:boom: :boom: :boom: Building the docker image failed, more information is available in the GitHub action logs." >> $GITHUB_ENV
59+
# fi
60+
#
61+
# - name: Mattermost Notification
62+
# uses: mattermost/action-mattermost-notify@master
63+
# with:
64+
# MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
65+
# TEXT: |
66+
# This is a message from ${{ github.repository }}.
67+
# [Pipeline](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}): ${{ env.STATUS_MESSAGE }}
68+
# MATTERMOST_USERNAME: ${{ github.triggering_actor }}

packages/csr-daisyui/public/md-content/home.de.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,46 @@
55
Diese Starter-Vorlage wurde mit folgenden Technologien erstellt:
66

77
- **TypeScript**: Für typsichere JavaScript-Entwicklung
8-
- **[React Router 7](https://reactrouter.com)**: Framework-Modus, konfiguriert für serverseitiges Rendering (SSR)
8+
- **[React Router 7](https://reactrouter.com)**: Im Library-Modus, konfiguriert für Client-Side Rendering (CSR)
99
- **[React 19](https://react.dev/reference/react)**: Die neueste Version von React
1010
- **[Tailwind 4](https://tailwindcss.com/docs/installation/using-vite)**: Für Utility-First CSS-Styling
11-
- **[Vite](https://vite.dev/guide/)**: Für schnelle Entwicklung und Bauzeiten
11+
- **[Vite](https://vite.dev/guide/)**: Für schnelle Entwicklung und Build-Zeiten
1212

13-
Bemerkenswerte Bibliotheken und Tools in diesem Projekt:
13+
Bibliotheken und Tools in diesem Projekt:
1414

15-
- **[remix-i18next](https://sergiodxa.github.io/remix-i18next/)**: Internationalisierungs-Framework für mehrsprachige Unterstützung
16-
- **[daisyui](https://daisyui.com/)**: Tailwind CSS-Komponentenbibliothek für minimalistische UI-Komponenten, die so nah wie möglich am Standard-HTML sind, und ausgearbeitetes Theming (siehe `/app/styles/tailwind.css`)
15+
- **[react-i18next](https://react.i18next.com)**: Internationalisierungs-Framework für mehrsprachige Unterstützung
16+
- **[daisyui](https://daisyui.com/)**: Tailwind CSS-Komponentenbibliothek für minimalistische UI-Komponenten, die so nah wie möglich an Vanilla-HTML sind, mit umfangreichen Theming-Möglichkeiten (siehe `/app/styles/tailwind.css`)
1717
- **[class-variance-authority](https://cva.style)**: Für die Erstellung flexibler Komponentenvarianten
18-
- **[remix-hook-form](https://github.com/forge-42/remix-hook-form)**: Zur Formularverarbeitung, mit `zod` für die Validierung
19-
- **react-markdown**: Zum Rendern von Markdown-Inhalten in React
18+
- **[react-hook-form](https://www.react-hook-form.com)**: Für Formularverarbeitung mit `zod` für die Validierung
19+
- **react-markdown**: Für das Rendern von Markdown-Inhalten in React
2020
- **lucide-react**: Alle Icons, die Sie wahrscheinlich jemals benötigen werden
2121
- **@uidotdev/usehooks**: Eine Sammlung nützlicher React-Hooks
2222
- **lodash-es**: Für Hilfsfunktionen
2323

24-
Weitere erwähnenswerte Aspekte:
24+
Weitere erwähnenswerte Funktionen:
2525

26-
- **Selbst gehostete Schriftarten**: Open Sans vorinstalliert und einsatzbereit als Beispiel für
27-
selbst gehostete Schriftarten. Die Schriftartendateien befinden sich in `/public/assets/open-sans/` und die CSS-
28-
Datei befindet sich in `/app/styles/fonts.css`. Sie können Ihre eigenen Schriftarten hinzufügen, indem Sie
29-
dieselbe Struktur befolgen.
30-
- **[Plausible.io](https://plausible.io/) Integration**: Einsatzbereit mit
31-
[Plausible](https://plausible.io/) für Analysen, Seitenaufrufe und Ereignisse; sowohl auf Server- als auch auf Client-Seite. Die Integration befindet sich in `/app/lib/plausible/`. Sie können Ihre eigene Plausible-Domain hinzufügen, indem Sie
32-
die .env-Datei bearbeiten, wenn Sie selbst hosten. Ereignisse werden immer nur an eine enthaltene API-Route gesendet, damit Sie die Ereigniserfassung auf derselben Domain wie Ihre App ausführen können.
26+
- **Selbstgehostete Schriften**: Open Sans vorinstalliert und einsatzbereit als Beispiel für
27+
selbstgehostete Schriften. Die Schriftdateien befinden sich in `/public/assets/open-sans/` und die CSS-Datei
28+
in `/app/styles/fonts.css`. Sie können Ihre eigenen Schriften hinzufügen, indem Sie
29+
die gleiche Struktur befolgen.
30+
- **[Plausible.io](https://plausible.io/) Integration**: Bereit zur Nutzung mit
31+
[Plausible](https://plausible.io/) für Analytics, Seitenaufrufe und Events auf der Clientseite. Die Integration befindet sich in `/app/lib/plausible/`. Sie können Ihre eigene Plausible-Domain durch
32+
Bearbeitung der .env-Datei festlegen, wenn Sie selbst hosten.
3333
- **Eslint, Prettier**: Vorkonfiguriert mit sinnvollen Standardeinstellungen für TypeScript und React. Sie können
34-
die Konfigurationsdateien nach Belieben anpassen. Das Projekt verwendet die von `@epic-web/config` bereitgestellten Voreinstellungen.
34+
die Konfigurationsdateien nach Ihren Vorlieben anpassen. Das Projekt verwendet die von `@epic-web/config` bereitgestellten Voreinstellungen.
3535

3636
## Projektstruktur
3737

38-
- `/app/`: Hauptanwendungsverzeichnis
38+
- `/app/`: Hauptverzeichnis der Anwendung
3939
- `/components/`: Wiederverwendbare UI-Komponenten
4040
- `/typography/`: Allgemeine Typografie-Komponenten wie Überschriften, Absätze usw.
41-
- `/theme/`: Layout- und Theming-Komponenten, Kopfzeile, Fußzeile usw.
42-
- `/ui/`: UI-Komponenten wie Schaltflächen, Eingabefelder usw.
43-
- `/routes/`: Routenkomponenten und Seitendefinitionen
44-
- `/files/`: Allgemeine dateibasierte Routen
45-
- `/api/`: Routen, die nur API-Anfragen verarbeiten
41+
- `/theme/`: Layout- und Theming-Komponenten, Header, Footer usw.
42+
- `/ui/`: UI-Komponenten wie Buttons, Eingabefelder usw.
43+
- `/routes/`: Routen-Komponenten und Seitendefinitionen
4644
- `/lib/`: Hilfsfunktionen, API-Clients, Helfer, ...
4745
- `/hooks/`: Benutzerdefinierte React-Hooks
4846
- `/config/`: Verschiedene Konfigurationsdateien
4947
- `/styles/`: Globale Stile und CSS-Dateien für Tailwind
50-
- `/middleware/`: React Router Middleware
5148
- `/public/`: Statische Assets
5249

5350
## Entwicklung
@@ -58,6 +55,7 @@ yarn run build # Projekt bauen
5855
yarn run up # Abhängigkeiten aktualisieren
5956
yarn run i18n:extract # i18n-Schlüssel und Standardwerte extrahieren
6057
```
58+
6159
## Bereitstellung
6260

63-
Sie können das enthaltene Dockerfile verwenden, um das Projekt zu bauen und bereitzustellen. Das Dockerfile befindet sich im Stammverzeichnis des Projekts. Das Projekt enthält auch eine Build-Pipeline für GitHub, um ein Image auf ghcr.io zu speichern.
61+
Sie können das enthaltene Dockerfile verwenden, um das Projekt zu erstellen und bereitzustellen. Es startet einen Caddy-Webserver beim Start und stellt die App auf einer Domain bereit, die in der Caddyfile definiert ist. Das Dockerfile und die Caddyfile befinden sich im Wurzelverzeichnis des Projekts. Das Projekt enthält auch eine Build-Pipeline für GitHub, um ein Image auf ghcr.io zu speichern.

packages/csr-daisyui/public/md-content/home.en.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
This starter template is built using the following technologies:
66

77
- **TypeScript**: For type-safe JavaScript development
8-
- **[React Router 7](https://reactrouter.com)**: Framework mode, configured for server-side rendering (SSR)
8+
- **[React Router 7](https://reactrouter.com)**: Library mode, configured for client-side rendering (CSR)
99
- **[React 19](https://react.dev/reference/react)**: The latest version of React
1010
- **[Tailwind 4](https://tailwindcss.com/docs/installation/using-vite)**: For utility-first CSS styling
1111
- **[Vite](https://vite.dev/guide/)**: For fast development and build times
1212

1313
Notable libraries and tools used in this project include:
1414

15-
- **[remix-i18next](https://sergiodxa.github.io/remix-i18next/)**: Internationalization framework for multi-language support
15+
- **[react-i18next](https://react.i18next.com)**: Internationalization framework for multi-language support
1616
- **[daisyui](https://daisyui.com/)**: Tailwind CSS component library for minimalistic UI components as close as possible to vanilla HTML and elaborate theming (see `/app/styles/tailwind.css`)
1717
- **[class-variance-authority](https://cva.style)**: For creating flexible component variants
18-
- **[remix-hook-form](https://github.com/forge-42/remix-hook-form)**: For form handling, using `zod` for validation
18+
- **[react-hook-form](https://www.react-hook-form.com)**: For form handling, using `zod` for validation
1919
- **react-markdown**: For rendering Markdown content in React
2020
- **lucide-react**: All the icons you will probably ever need
2121
- **@uidotdev/usehooks**: A collection of useful React hooks
@@ -28,8 +28,8 @@ Other notable mentions:
2828
file is located in `/app/styles/fonts.css`. You can add your own fonts by
2929
following the same structure.
3030
- **[Plausible.io](https://plausible.io/) Integration**: Ready to use with
31-
[Plausible](https://plausible.io/) for analytics, page views and events; on the server and client side. The integration is located in `/app/lib/plausible/`. You can add your own Plausible domain by
32-
editing the .env file if you're self-hosting. Events are only ever sent to an included api route so you can run event collection on the same domain as your app.
31+
[Plausible](https://plausible.io/) for analytics, page views and events; on the client side. The integration is located in `/app/lib/plausible/`. You can add your own Plausible domain by
32+
editing the .env file if you're self-hosting.
3333
- **Eslint, Prettier**: Preconfigured with sensible defaults for TypeScript and React. You can
3434
customize the configuration files to your liking. The project uses the presets provided by `@epic-web/config`.
3535

@@ -41,13 +41,10 @@ Other notable mentions:
4141
- `/theme/`: Layout and theming components, header, footer, etc.
4242
- `/ui/`: UI components like buttons, inputs, etc.
4343
- `/routes/`: Route components and page definitions
44-
- `/files/`: Common file based routes
45-
- `/api/`: Routes that are only handling API requests
4644
- `/lib/`: Utility functions, API clients, helpers, ...
4745
- `/hooks/`: Custom React hooks
4846
- `/config/`: Various configuration files
4947
- `/styles/`: Global styles and CSS files for tailwind
50-
- `/middleware/`: React Router middleware
5148
- `/public/`: Static assets
5249

5350
## Development
@@ -61,4 +58,4 @@ yarn run i18n:extract # extract i18n keys and default values
6158

6259
## Deployment
6360

64-
You can use the included Dockerfile to build and deploy the project. The Dockerfile is located in the root of the project. The project also includes a build pipeline for GitHub to store an image on ghcr.io.
61+
You can use the included Dockerfile to build and deploy the project. It will start a caddy webserver when launched and serve the app on a domain that is defined in the `Caddyfile`. The `Dockerfile` and `Caddyfile` are located in the root of the project. The project also includes a build pipeline for GitHub to store an image on ghcr.io.

packages/ssr-daisyui/app/md-content/home.de.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Diese Starter-Vorlage wurde mit folgenden Technologien erstellt:
1010
- **[Tailwind 4](https://tailwindcss.com/docs/installation/using-vite)**: Für Utility-First CSS-Styling
1111
- **[Vite](https://vite.dev/guide/)**: Für schnelle Entwicklung und Bauzeiten
1212

13-
Bemerkenswerte Bibliotheken und Tools in diesem Projekt:
13+
Bibliotheken und Tools in diesem Projekt:
1414

1515
- **[remix-i18next](https://sergiodxa.github.io/remix-i18next/)**: Internationalisierungs-Framework für mehrsprachige Unterstützung
1616
- **[daisyui](https://daisyui.com/)**: Tailwind CSS-Komponentenbibliothek für minimalistische UI-Komponenten, die so nah wie möglich am Standard-HTML sind, und ausgearbeitetes Theming (siehe `/app/styles/tailwind.css`)

0 commit comments

Comments
 (0)