"feat: Add: Update documentation and rename scripts for better organization"
This commit is contained in:
parent
32ee5f065c
commit
3cca91a4ea
87
.gitignore
vendored
Normal file
87
.gitignore
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# MYP - Manage your Printer .gitignore
|
||||
|
||||
# Betriebssystem-spezifische Dateien
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
|
||||
# Sensible Daten und Konfigurationen
|
||||
config/secure/
|
||||
*.env
|
||||
*.pem
|
||||
*.key
|
||||
*.cer
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Python spezifische Dateien
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# JavaScript/Node spezifische Dateien
|
||||
node_modules/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
.next/
|
||||
out/
|
||||
.vercel
|
||||
*.tsbuildinfo
|
||||
|
||||
# IDE Dateien
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.project
|
||||
.classpath
|
||||
.settings/
|
||||
|
||||
# Logs und temporäre Dateien
|
||||
logs/
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
temp/
|
||||
tmp/
|
||||
|
||||
# Datenbanken und SQLite Dateien
|
||||
*.sqlite
|
||||
*.sqlite3
|
||||
*.db
|
||||
instance/
|
||||
|
||||
# Kompilierte Dateien und Binaries
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
*.dylib
|
@ -1,3 +0,0 @@
|
||||
TAPO ADMIN: vT6Vsd^p
|
||||
Admin-PW: 744563017196
|
||||
Tapo: 744563017196A
|
@ -1,6 +1,23 @@
|
||||
# Dokumentation
|
||||
# Dokumentation MYP - Manage your Printer
|
||||
|
||||
Komplikationen:
|
||||
## Projektbeschreibung
|
||||
MYP (Manage your Printer) ist eine Plattform zur Reservierung von 3D-Druckern, die für die TBA im Werk 040, Berlin-Marienfelde, entwickelt wurde.
|
||||
|
||||
## Projektstruktur
|
||||
- `backend/`: Flask-Backend für die API-Anbindung und Datenbankzugriff
|
||||
- `packages/reservation-platform/`: Next.js Frontend für die Benutzeroberfläche
|
||||
- `docs/`: Ausführliche Dokumentationen, Datenbankschema und Diagramme
|
||||
- `scripts/`: Deployment- und Setup-Skripte
|
||||
- `logs/`: Fehlerprotokolle und Logs
|
||||
|
||||
## Umfassende Dokumentation
|
||||
Detaillierte Dokumentationen finden Sie in den folgenden Dateien:
|
||||
- [Technische Dokumentation](docs/README.md)
|
||||
- [Datenbankstruktur](docs/MYP.dbml)
|
||||
- [Aktueller Projektstand](docs/Aktueller%20Stand.md)
|
||||
- [IHK-Dokumentation](docs/Dokumentation_IHK.md)
|
||||
|
||||
## Herausforderungen und Komplikationen
|
||||
- Netzwerkanbindung
|
||||
- Ermitteln der Schnittstellen der Drucker
|
||||
- Auswahl der Anbindung, Entwickeln eines Netzwerkkonzeptes
|
||||
@ -9,3 +26,15 @@ Komplikationen:
|
||||
- Frontend verstehen lernen
|
||||
- Netzwerk einrichten, Frontend anbinden
|
||||
|
||||
## Verwendete Technologien
|
||||
- Backend: Python, Flask
|
||||
- Frontend: Next.js, React, TypeScript
|
||||
- Datenbank: SQL
|
||||
- Docker für Containerisierung
|
||||
- Raspberry Pi für Druckersteuerung
|
||||
|
||||
## Installation und Einsatz
|
||||
Installation und Einrichtung werden durch die Skripte im Verzeichnis `scripts/` unterstützt.
|
||||
- `scripts/setup/`: Einrichtungsskripte für Backend, Docker und OAuth
|
||||
- `scripts/deployment/`: Bereitstellungsskripte für Raspberry Pi
|
||||
|
||||
|
19
README.md
19
README.md
@ -1,11 +1,10 @@
|
||||
<<<<<<< HEAD
|
||||
# 📦 MYP
|
||||
# 📦 MYP - Manage your Printer
|
||||
|
||||
MYP *(Manage your Printer)* ist eine Plattform zur Reservierung von 3D-Druckern, die für die TBA im Werk 040, Berlin-Marienfelde, entwickelt wurde.
|
||||
|
||||
> Frontend: https://git.i.mercedes-benz.com/TBA-Berlin-FI/MYP/tree/main/packages/reservation-platform
|
||||
|
||||
> :warning: MYP ist zzt. in Entwicklung
|
||||
|
||||
MYP *(Manage your Printer)* ist eine Plattform zur Reservierung von 3D-Druckern, die für die TBA im Werk 040, Berlin-Marienfelde, entwickelt wurde.
|
||||
> ⚠️ MYP ist zzt. in Entwicklung
|
||||
|
||||
> ‼ Datenbank aus Blueprint steht im Konflikt zu MYP.sql - Integration muss besprochen werden
|
||||
|
||||
@ -20,32 +19,34 @@ MYP *(Manage your Printer)* ist eine Plattform zur Reservierung von 3D-Druckern,
|
||||
(MYP.sql - Gerät: Reservation Pi)
|
||||
|
||||
### Printer
|
||||
|
||||
- Speichert Informationen zu Druckern.
|
||||
- Beinhaltet Details wie Namen, Beschreibung und Betriebsstatus.
|
||||
- Verknüpft mit Druckaufträgen.
|
||||
|
||||
### PrintJob
|
||||
|
||||
- Enthält alle Druckaufträge.
|
||||
- Jeder Auftrag ist einem Drucker und einem Benutzer zugeordnet.
|
||||
- Speichert Startzeit, Dauer und Kommentare zu den Aufträgen.
|
||||
- Erfassung, ob ein Auftrag abgebrochen wurde und die dazugehörige Begründung.
|
||||
|
||||
### Account
|
||||
|
||||
- Verwaltet Benutzerkonten.
|
||||
- Speichert Authentifizierungsdetails wie Tokens und deren Ablaufzeiten.
|
||||
|
||||
### Session
|
||||
|
||||
- Erfasst Session-Daten.
|
||||
- Beinhaltet eindeutige Session-Tokens und Ablaufdaten.
|
||||
|
||||
### User
|
||||
|
||||
- Speichert Benutzerinformationen.
|
||||
- Verknüpft mit Druckaufträgen, Accounts und Sessions.
|
||||
|
||||
## Fremdschlüsselbeziehungen
|
||||
|
||||
- `User` ist verknüpft mit `PrintJob`, `Account` und `Session` über Benutzer-ID.
|
||||
- `Printer` ist verknüpft mit `PrintJob` über die Drucker-ID.
|
||||
=======
|
||||
# Projektarbeit-MYP
|
||||
|
||||
>>>>>>> dfd63d7c9ddf4b3a654f06dff38bebdbec7395d7
|
||||
|
1
docs/Aufräumarbeiten.md
Normal file
1
docs/Aufräumarbeiten.md
Normal file
@ -0,0 +1 @@
|
||||
|
90
fehler
90
fehler
@ -1,90 +0,0 @@
|
||||
root@m040tbaraspi001:/home/user/Projektarbeit-MYP# ./raspi-frontend-deploy.sh
|
||||
[2025-04-01 15:38:07] Datenbankverzeichnis existiert bereits: /srv/MYP-DB
|
||||
|
||||
===== Backend-URL Konfiguration =====
|
||||
|
||||
[2025-04-01 15:38:07] Standard-Backend-URL: http://192.168.0.105:5000
|
||||
Möchten Sie eine andere Backend-URL verwenden? (j/n): n
|
||||
[2025-04-01 15:38:08] Verwende Standard-Backend-URL: http://192.168.0.105:5000
|
||||
|
||||
===== MYP Frontend Deployment =====
|
||||
|
||||
Bitte wählen Sie eine Option:
|
||||
|
||||
1) Alles automatisch (Build, Deploy, Starten)
|
||||
2) Docker-Image bauen
|
||||
3) Docker-Image speichern
|
||||
4) Docker-Image laden
|
||||
5) Container mit Docker Compose starten
|
||||
6) Container direkt mit Docker Run starten
|
||||
7) Anwendung ohne Docker starten
|
||||
8) Nur Backend-URL konfigurieren
|
||||
9) Beenden
|
||||
|
||||
Ihre Wahl (1-9): 2
|
||||
|
||||
===== Docker-Image bauen =====
|
||||
|
||||
[2025-04-01 15:38:13] Baue Docker-Image: myp-rp:latest
|
||||
[2025-04-01 15:38:13] Baue Docker-Image... (Dies kann auf einem Raspberry Pi mehrere Minuten dauern)
|
||||
[+] Building 74.4s (14/14) FINISHED docker:default
|
||||
=> [internal] load build definition from Dockerfile 0.0s
|
||||
=> => transferring dockerfile: 697B 0.0s
|
||||
=> [internal] load metadata for docker.io/library/node:20-bookworm-slim 1.1s
|
||||
=> [internal] load .dockerignore 0.0s
|
||||
=> => transferring context: 402B 0.0s
|
||||
=> [internal] load build context 0.0s
|
||||
=> => transferring context: 19.02kB 0.0s
|
||||
=> [ 1/10] FROM docker.io/library/node:20-bookworm-slim@sha256:d6e4ec9eaf2390129b5d23904d07ae03ef744818386bcab3fc45fe63405b5eb2 0.0s
|
||||
=> CACHED [ 2/10] RUN mkdir -p /usr/src/app 0.0s
|
||||
=> CACHED [ 3/10] WORKDIR /usr/src/app 0.0s
|
||||
=> CACHED [ 4/10] COPY package.json /usr/src/app 0.0s
|
||||
=> CACHED [ 5/10] COPY pnpm-lock.yaml /usr/src/app 0.0s
|
||||
=> CACHED [ 6/10] RUN corepack enable pnpm 0.0s
|
||||
=> CACHED [ 7/10] RUN pnpm install 0.0s
|
||||
=> [ 8/10] COPY . /usr/src/app 0.3s
|
||||
=> [ 9/10] RUN pnpm run db 5.9s
|
||||
=> ERROR [10/10] RUN pnpm run build 66.7s
|
||||
------
|
||||
> [10/10] RUN pnpm run build:
|
||||
0.917
|
||||
0.917 > myp-rp@1.0.0 build /usr/src/app
|
||||
0.917 > node update-package.js && next build
|
||||
0.917
|
||||
0.968 ℹ️ OAuth-Konfiguration ist bereits aktuell.
|
||||
0.969 ℹ️ OAuth-Callback-Route ist bereits aktuell.
|
||||
0.970 ℹ️ package.json ist bereits aktualisiert.
|
||||
0.970 ✅ OAuth-Konfiguration wurde erfolgreich vorbereitet.
|
||||
1.800 ▲ Next.js 14.2.3
|
||||
1.801 - Environments: .env.local, .env
|
||||
1.801
|
||||
1.821 Creating an optimized production build ...
|
||||
43.85 Browserslist: caniuse-lite is outdated. Please run:
|
||||
43.85 npx update-browserslist-db@latest
|
||||
43.85 Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
||||
50.09 ✓ Compiled successfully
|
||||
50.09 Linting and checking validity of types ...
|
||||
64.70 Failed to compile.
|
||||
64.70
|
||||
64.70 ./src/app/auth/login/route.ts:14:3
|
||||
64.70 Type error: Object literal may only specify known properties, and 'redirectURI' does not exist in type '{ scopes?: string[] | undefined; }'.
|
||||
64.70
|
||||
64.70 12 | const url = await github.createAuthorizationURL(state, {
|
||||
64.70 13 | scopes: ["user"],
|
||||
64.70 > 14 | redirectURI: OAUTH_CALLBACK_URL,
|
||||
64.70 | ^
|
||||
64.70 15 | });
|
||||
64.70 16 | const ONE_HOUR = 60 * 60;
|
||||
64.70 17 |
|
||||
64.75 ELIFECYCLE Command failed with exit code 1.
|
||||
------
|
||||
Dockerfile:29
|
||||
--------------------
|
||||
27 |
|
||||
28 | # Build the application
|
||||
29 | >>> RUN pnpm run build
|
||||
30 |
|
||||
31 | EXPOSE 3000
|
||||
--------------------
|
||||
ERROR: failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
|
||||
[2025-04-01 15:39:28] FEHLER: Fehler beim Bauen des Docker-Images.
|
0
debug.sh → scripts/debug.sh
Executable file → Normal file
0
debug.sh → scripts/debug.sh
Executable file → Normal file
0
raspi-cleanup.sh → scripts/deployment/raspi-cleanup.sh
Executable file → Normal file
0
raspi-cleanup.sh → scripts/deployment/raspi-cleanup.sh
Executable file → Normal file
0
raspi-frontend-deploy.sh → scripts/deployment/raspi-frontend-deploy.sh
Executable file → Normal file
0
raspi-frontend-deploy.sh → scripts/deployment/raspi-frontend-deploy.sh
Executable file → Normal file
0
configure-oauth.sh → scripts/setup/configure-oauth.sh
Executable file → Normal file
0
configure-oauth.sh → scripts/setup/configure-oauth.sh
Executable file → Normal file
0
get-docker.sh → scripts/setup/get-docker.sh
Executable file → Normal file
0
get-docker.sh → scripts/setup/get-docker.sh
Executable file → Normal file
0
https-setup.sh → scripts/setup/https-setup.sh
Executable file → Normal file
0
https-setup.sh → scripts/setup/https-setup.sh
Executable file → Normal file
0
install-backend.sh → scripts/setup/install-backend.sh
Executable file → Normal file
0
install-backend.sh → scripts/setup/install-backend.sh
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user