commit 56aa7836f49edd3c8d138673726b2c1d5236b3e2 Author: Kevin Adametz Date: Tue Apr 1 10:49:26 2025 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..403adbc --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +.DS_Store +node_modules +/dist + + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/backend/.editorconfig b/backend/.editorconfig new file mode 100644 index 0000000..8f0de65 --- /dev/null +++ b/backend/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[docker-compose.yml] +indent_size = 4 diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..35db1dd --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,65 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +# APP_MAINTENANCE_STORE=database + +PHP_CLI_SERVER_WORKERS=4 + +BCRYPT_ROUNDS=12 + +LOG_CHANNEL=stack +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=sqlite +# DB_HOST=127.0.0.1 +# DB_PORT=3306 +# DB_DATABASE=laravel +# DB_USERNAME=root +# DB_PASSWORD= + +SESSION_DRIVER=database +SESSION_LIFETIME=120 +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null + +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=database + +CACHE_STORE=database +# CACHE_PREFIX= + +MEMCACHED_HOST=127.0.0.1 + +REDIS_CLIENT=phpredis +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=log +MAIL_SCHEME=null +MAIL_HOST=127.0.0.1 +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +VITE_APP_NAME="${APP_NAME}" diff --git a/backend/.gitattributes b/backend/.gitattributes new file mode 100644 index 0000000..f50f803 --- /dev/null +++ b/backend/.gitattributes @@ -0,0 +1,10 @@ +* text=auto eol=lf + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +CHANGELOG.md export-ignore +README.md export-ignore diff --git a/backend/.github/workflows/lint.yml b/backend/.github/workflows/lint.yml new file mode 100644 index 0000000..c3a441b --- /dev/null +++ b/backend/.github/workflows/lint.yml @@ -0,0 +1,46 @@ +name: linter + +on: + push: + branches: + - develop + - main + pull_request: + branches: + - develop + - main + +permissions: + contents: write + +jobs: + quality: + runs-on: ubuntu-latest + environment: Testing + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + + - name: Add Flux Credentials Loaded From ENV + run: composer config http-basic.composer.fluxui.dev "${{ secrets.FLUX_USERNAME }}" "${{ secrets.FLUX_LICENSE_KEY }}" + + - name: Install Dependencies + run: | + composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + npm install + + - name: Run Pint + run: vendor/bin/pint + + # - name: Commit Changes + # uses: stefanzweifel/git-auto-commit-action@v5 + # with: + # commit_message: fix code style + # commit_options: '--no-verify' + # file_pattern: | + # **/* + # !.github/workflows/* diff --git a/backend/.github/workflows/tests.yml b/backend/.github/workflows/tests.yml new file mode 100644 index 0000000..0cf2c68 --- /dev/null +++ b/backend/.github/workflows/tests.yml @@ -0,0 +1,54 @@ +name: tests + +on: + push: + branches: + - develop + - main + pull_request: + branches: + - develop + - main + +jobs: + ci: + runs-on: ubuntu-latest + environment: Testing + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.4 + tools: composer:v2 + coverage: xdebug + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install Node Dependencies + run: npm i + + - name: Add Flux Credentials Loaded From ENV + run: composer config http-basic.composer.fluxui.dev "${{ secrets.FLUX_USERNAME }}" "${{ secrets.FLUX_LICENSE_KEY }}" + + - name: Install Dependencies + run: composer install --no-interaction --prefer-dist --optimize-autoloader + + - name: Copy Environment File + run: cp .env.example .env + + - name: Generate Application Key + run: php artisan key:generate + + - name: Build Assets + run: npm run build + + - name: Run Tests + run: ./vendor/bin/pest \ No newline at end of file diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000..c7cf1fa --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,23 @@ +/.phpunit.cache +/node_modules +/public/build +/public/hot +/public/storage +/storage/*.key +/storage/pail +/vendor +.env +.env.backup +.env.production +.phpactor.json +.phpunit.result.cache +Homestead.json +Homestead.yaml +npm-debug.log +yarn-error.log +/auth.json +/.fleet +/.idea +/.nova +/.vscode +/.zed diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..6bddcc0 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,109 @@ +# Thats me Backend + +Dies ist das Backend für die "Thats me"-Anwendung, basierend auf dem Laravel Framework. + +## Technologie-Stack + +- [Laravel](https://laravel.com/) (v12) +- [Livewire](https://livewire.laravel.com/) +- [Volt](https://livewire.laravel.com/docs/volt) +- [Vite](https://vitejs.dev/) (für Frontend-Asset-Kompilierung) +- [PHP](https://www.php.net/) (Version entsprechend den Laravel 12 Anforderungen, z.B. >= 8.2) +- [Composer](https://getcomposer.org/) (für PHP-Abhängigkeitsmanagement) +- [Node.js & NPM/Yarn](https://nodejs.org/) (für Vite/Frontend-Build-Prozess) +- [Flux] (https://fluxui.dev) (Componenten für das Backend) + +## Installation + +1. **Repository klonen** (falls noch nicht im Hauptprojekt geschehen): + + ```bash + git clone + cd /backend # Oder der entsprechende Pfad zum Backend + ``` + +2. **PHP Abhängigkeiten installieren:** + + ```bash + composer install + ``` + +3. **Konfigurationsdatei erstellen:** + Kopiere die Beispiel-Umgebungsvariablendatei: + + ```bash + cp .env.example .env + ``` + + \_Hinweis: Bearbeite die `.env`-Datei und konfiguriere insbesondere die Datenbankverbindung (`DB\__`) und die `APP_URL`.\* + +4. **Anwendungsschlüssel generieren:** + + ```bash + php artisan key:generate + ``` + +5. **Datenbankmigrationen ausführen:** + Stelle sicher, dass deine Datenbank konfiguriert ist (siehe Schritt 3). + + ```bash + php artisan migrate + ``` + + _Optional: Wenn du Seed-Daten hast:_ + + ```bash + php artisan db:seed # Optional + ``` + +6. **Frontend Assets installieren und bauen:** + ```bash + npm install # oder yarn install + npm run build # Baut die Assets für die Produktion + ``` + +## Entwicklung + +**Entwicklungsserver starten:** + +Um den lokalen Laravel-Entwicklungsserver zu starten (normalerweise auf `http://127.0.0.1:8000`): + +```bash +php artisan serve +#oder laravel herd (https://herd.laravel.com) #oder alternative PHP / MYSQL Serverumgebung (MAMP etc.) +``` + +**Frontend Assets mit Vite:** + +Um den Vite-Server für Hot Module Replacement (HMR) während der Frontend-Entwicklung (innerhalb von Laravel/Blade/Livewire) zu starten: + +```bash +npm run dev # oder yarn dev +``` + +Die Konfiguration für Vite (wie z.B. die Eingabedateien für CSS/JS und die Verwendung des Laravel-Plugins) wird in der Datei `vite.config.js` im Stammverzeichnis des Backends festgelegt. Diese Datei ist entscheidend dafür, wie Vite die Assets für die Laravel-Anwendung verarbeitet und bündelt. + +_Hinweis: Der Vite-Server läuft normalerweise auf einem anderen Port (z.B. 5173) und arbeitet mit `php artisan serve` zusammen._ + +## Testing + +Um die PHPUnit-Tests auszuführen: + +```bash +php artisan test +``` + +## Livewire & Volt + +Dieses Projekt nutzt Livewire und Volt für interaktive Frontend-Komponenten direkt im Backend-Code. Komponenten findest du typischerweise in: + +- **Livewire:** `app/Livewire/` oder `app/Http/Livewire/` (je nach Konfiguration) +- **Volt:** Oft als Single-File-Komponenten direkt in den `resources/views/livewire/` oder `resources/views/components/` Verzeichnissen (als `.blade.php` Dateien mit ` diff --git a/frontend/src/assets/quasar-logo-vertical.svg b/frontend/src/assets/quasar-logo-vertical.svg new file mode 100644 index 0000000..8210831 --- /dev/null +++ b/frontend/src/assets/quasar-logo-vertical.svg @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/frontend/src/boot/.gitkeep b/frontend/src/boot/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/components/EssentialLink.vue b/frontend/src/components/EssentialLink.vue new file mode 100644 index 0000000..54afb06 --- /dev/null +++ b/frontend/src/components/EssentialLink.vue @@ -0,0 +1,44 @@ + + + diff --git a/frontend/src/css/app.scss b/frontend/src/css/app.scss new file mode 100644 index 0000000..ecac98f --- /dev/null +++ b/frontend/src/css/app.scss @@ -0,0 +1 @@ +// app global css in SCSS form diff --git a/frontend/src/css/quasar.variables.scss b/frontend/src/css/quasar.variables.scss new file mode 100644 index 0000000..3996ce1 --- /dev/null +++ b/frontend/src/css/quasar.variables.scss @@ -0,0 +1,25 @@ +// Quasar SCSS (& Sass) Variables +// -------------------------------------------------- +// To customize the look and feel of this app, you can override +// the Sass/SCSS variables found in Quasar's source Sass/SCSS files. + +// Check documentation for full list of Quasar variables + +// Your own variables (that are declared here) and Quasar's own +// ones will be available out of the box in your .vue/.scss/.sass files + +// It's highly recommended to change the default colors +// to match your app's branding. +// Tip: Use the "Theme Builder" on Quasar's documentation website. + +$primary : #1976D2; +$secondary : #26A69A; +$accent : #9C27B0; + +$dark : #1D1D1D; +$dark-page : #121212; + +$positive : #21BA45; +$negative : #C10015; +$info : #31CCEC; +$warning : #F2C037; diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue new file mode 100644 index 0000000..faf69a4 --- /dev/null +++ b/frontend/src/layouts/MainLayout.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/frontend/src/pages/ErrorNotFound.vue b/frontend/src/pages/ErrorNotFound.vue new file mode 100644 index 0000000..4b53e5a --- /dev/null +++ b/frontend/src/pages/ErrorNotFound.vue @@ -0,0 +1,27 @@ + + + diff --git a/frontend/src/pages/IndexPage.vue b/frontend/src/pages/IndexPage.vue new file mode 100644 index 0000000..dd3100b --- /dev/null +++ b/frontend/src/pages/IndexPage.vue @@ -0,0 +1,13 @@ + + + diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js new file mode 100644 index 0000000..226eb50 --- /dev/null +++ b/frontend/src/router/index.js @@ -0,0 +1,30 @@ +import { defineRouter } from '#q-app/wrappers' +import { createRouter, createMemoryHistory, createWebHistory, createWebHashHistory } from 'vue-router' +import routes from './routes' + +/* + * If not building with SSR mode, you can + * directly export the Router instantiation; + * + * The function below can be async too; either use + * async/await or return a Promise which resolves + * with the Router instance. + */ + +export default defineRouter(function (/* { store, ssrContext } */) { + const createHistory = process.env.SERVER + ? createMemoryHistory + : (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory) + + const Router = createRouter({ + scrollBehavior: () => ({ left: 0, top: 0 }), + routes, + + // Leave this as is and make changes in quasar.conf.js instead! + // quasar.conf.js -> build -> vueRouterMode + // quasar.conf.js -> build -> publicPath + history: createHistory(process.env.VUE_ROUTER_BASE) + }) + + return Router +}) diff --git a/frontend/src/router/routes.js b/frontend/src/router/routes.js new file mode 100644 index 0000000..1b2e365 --- /dev/null +++ b/frontend/src/router/routes.js @@ -0,0 +1,18 @@ +const routes = [ + { + path: '/', + component: () => import('layouts/MainLayout.vue'), + children: [ + { path: '', component: () => import('pages/IndexPage.vue') } + ] + }, + + // Always leave this as last one, + // but you can also remove it + { + path: '/:catchAll(.*)*', + component: () => import('pages/ErrorNotFound.vue') + } +] + +export default routes diff --git a/frontend/src/stores/example-store.js b/frontend/src/stores/example-store.js new file mode 100644 index 0000000..041324e --- /dev/null +++ b/frontend/src/stores/example-store.js @@ -0,0 +1,21 @@ +import { defineStore, acceptHMRUpdate } from 'pinia' + +export const useCounterStore = defineStore('counter', { + state: () => ({ + counter: 0 + }), + + getters: { + doubleCount: (state) => state.counter * 2 + }, + + actions: { + increment() { + this.counter++ + } + } +}) + +if (import.meta.hot) { + import.meta.hot.accept(acceptHMRUpdate(useCounterStore, import.meta.hot)) +} diff --git a/frontend/src/stores/index.js b/frontend/src/stores/index.js new file mode 100644 index 0000000..a260a8c --- /dev/null +++ b/frontend/src/stores/index.js @@ -0,0 +1,20 @@ +import { defineStore } from '#q-app/wrappers' +import { createPinia } from 'pinia' + +/* + * If not building with SSR mode, you can + * directly export the Store instantiation; + * + * The function below can be async too; either use + * async/await or return a Promise which resolves + * with the Store instance. + */ + +export default defineStore((/* { ssrContext } */) => { + const pinia = createPinia() + + // You can add Pinia plugins here + // pinia.use(SomePiniaPlugin) + + return pinia +}) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..1d4b4b9 --- /dev/null +++ b/readme.md @@ -0,0 +1,88 @@ +# Thats me + +Eine kurze Beschreibung, was dieses Projekt macht (ein oder zwei Sätze). + +## Inhaltsverzeichnis + +- [Beschreibung](#beschreibung) +- [Technologie-Stack](#technologie-stack) +- [Installation](#installation) +- [Verwendung](#verwendung) +- [Mitwirken](#mitwirken) +- [Lizenz](#lizenz) + +## Beschreibung + +Eine ausführlichere Beschreibung des Projekts. Was ist das Ziel? Welche Probleme löst es? Was sind die Hauptmerkmale? + +## Technologie-Stack + +Dieses Projekt verwendet die folgenden Technologien: + +- **Frontend:** + - [Quasar Framework](https://quasar.dev/) (v2 mit Vite) + - Für Details siehe: [frontend/README.md](./frontend/README.md) +- **Backend:** + - [Laravel](https://laravel.com/) (v12) + - [Livewire](https://livewire.laravel.com/) + - [Volt](https://livewire.laravel.com/docs/volt) + - [Vite](https://vitejs.dev/) (für Asset-Bundling im Backend) + - [Flux] (https://fluxui.dev) (Componten für das Backend) + - _(Optional: Füge hier einen Link zum Backend-README hinzu, falls vorhanden, z.B. `[backend/README.md](./backend/README.md)`)_ + +## Installation + +**Beispiel:** + +1. Klone das Repository: + ```bash + git clone https://github.com/dein-benutzername/dein-projekt.git + cd dein-projekt + ``` +2. Installiere die Frontend-Abhängigkeiten (siehe [frontend/README.md](./frontend/README.md) für Details): + ```bash + cd frontend + npm install # oder yarn install + cd .. + ``` +3. Installiere die Backend-Abhängigkeiten (füge hier die entsprechenden Befehle für Laravel hinzu, z.B. `composer install`, `.env` einrichten, Datenbankmigrationen): + ```bash + cd backend # (oder das Stammverzeichnis, je nach Struktur) + composer install + cp .env.example .env + php artisan key:generate + # ... weitere Backend-Setup-Schritte ... + cd .. + ``` + +## Verwendung + +Wie wird das Projekt gestartet und verwendet? Beschreibe, wie man sowohl den Frontend- als auch den Backend-Server startet. + +**Beispiel:** + +1. Starte den Backend-Server (im Backend-Verzeichnis): + ```bash + php artisan serve #oder laravel herd (https://herd.laravel.com) #oder alternative PHP / MYSQL Serverumgebung (MAMP etc.) + ``` +2. Starte den Frontend-Entwicklungsserver (im Frontend-Verzeichnis): + ```bash + quasar dev + ``` +3. Öffne die Anwendung in deinem Browser (normalerweise unter `http://localhost:8080` oder einer ähnlichen Adresse, die vom Quasar Dev-Server angezeigt wird). + +## Mitwirken + +Erkläre, wie andere zum Projekt beitragen können. Gibt es Richtlinien für Pull Requests oder das Melden von Fehlern? + +1. Forke das Repository. +2. Erstelle einen neuen Branch (`git checkout -b feature/neues-feature`). +3. Committe deine Änderungen (`git commit -am 'Füge neues Feature hinzu'`). +4. Pushe zum Branch (`git push origin feature/neues-feature`). +5. Öffne einen Pull Request. + +## Lizenz + +Gib an, unter welcher Lizenz das Projekt veröffentlicht wird. Zum Beispiel: + +Dieses Projekt ist unter der MIT-Lizenz lizenziert - siehe die [LICENSE.md](LICENSE.md)-Datei für Details (falls vorhanden). diff --git a/thats-me.test.code-workspace b/thats-me.test.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/thats-me.test.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file