update README
This commit is contained in:
157
README.md
157
README.md
@@ -1,50 +1,141 @@
|
||||
# Welcome to your Expo app 👋
|
||||
# CalChat
|
||||
|
||||
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
|
||||
Kalender-App mit KI-Chatbot. Termine lassen sich per Chat in natuerlicher Sprache erstellen, bearbeiten und loeschen.
|
||||
|
||||
## Get started
|
||||
## Tech Stack
|
||||
|
||||
1. Install dependencies
|
||||
| Bereich | Technologie |
|
||||
|---------|-------------|
|
||||
| Frontend | React Native, Expo, Expo-Router, NativeWind, Zustand |
|
||||
| Backend | Express.js, MongoDB, Mongoose, OpenAI GPT |
|
||||
| Shared | TypeScript Monorepo mit npm Workspaces |
|
||||
| Optional | CalDAV-Sync (z.B. Radicale) |
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
## Voraussetzungen
|
||||
|
||||
2. Start the app
|
||||
- Node.js (>= 20)
|
||||
- npm
|
||||
- Docker & Docker Compose (fuer MongoDB)
|
||||
- OpenAI API Key (fuer KI-Chat)
|
||||
- Android SDK + Java (nur fuer APK-Build)
|
||||
|
||||
```bash
|
||||
npx expo start
|
||||
```
|
||||
## Projekt aufsetzen
|
||||
|
||||
In the output, you'll find options to open the app in a
|
||||
|
||||
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
|
||||
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
|
||||
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
|
||||
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
|
||||
|
||||
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
|
||||
|
||||
## Get a fresh project
|
||||
|
||||
When you're ready, run:
|
||||
### 1. Repository klonen
|
||||
|
||||
```bash
|
||||
npm run reset-project
|
||||
git clone <repo-url>
|
||||
cd calchat
|
||||
```
|
||||
|
||||
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
|
||||
### 2. Dependencies installieren
|
||||
|
||||
## Learn more
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
To learn more about developing your project with Expo, look at the following resources:
|
||||
Installiert alle Dependencies fuer Client, Server und Shared.
|
||||
|
||||
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
|
||||
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
|
||||
### 3. MongoDB starten
|
||||
|
||||
## Join the community
|
||||
```bash
|
||||
cd apps/server/docker/mongo
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Join our community of developers creating universal apps.
|
||||
- MongoDB: `localhost:27017` (root/mongoose)
|
||||
- Mongo Express UI: `localhost:8083` (admin/admin)
|
||||
|
||||
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
|
||||
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
|
||||
### 4. Server konfigurieren
|
||||
|
||||
```bash
|
||||
cp apps/server/.env.example apps/server/.env
|
||||
```
|
||||
|
||||
`apps/server/.env` bearbeiten:
|
||||
|
||||
```env
|
||||
MONGODB_URI=mongodb://root:mongoose@localhost:27017/calchat?authSource=admin
|
||||
OPENAI_API_KEY=sk-proj-... # Eigenen Key eintragen
|
||||
USE_TEST_RESPONSES=false # true = statische Testantworten ohne GPT
|
||||
LOG_LEVEL=debug
|
||||
NODE_ENV=development
|
||||
PORT=3000
|
||||
```
|
||||
|
||||
### 5. Client konfigurieren
|
||||
|
||||
```bash
|
||||
cp apps/client/.env.example apps/client/.env
|
||||
```
|
||||
|
||||
`apps/client/.env` bearbeiten:
|
||||
|
||||
```env
|
||||
# Fuer Emulator/Web:
|
||||
EXPO_PUBLIC_API_URL=http://localhost:3000/api
|
||||
|
||||
# Fuer physisches Geraet im gleichen Netzwerk:
|
||||
EXPO_PUBLIC_API_URL=http://<DEINE-LOKALE-IP>:3000/api
|
||||
```
|
||||
|
||||
### 6. Server starten
|
||||
|
||||
```bash
|
||||
npm run dev -w @calchat/server
|
||||
```
|
||||
|
||||
Startet den Server auf Port 3000 (mit `tsx watch` - startet bei Dateiänderungen automatisch neu (oder sollte es zumindest)).
|
||||
|
||||
### 7. Client starten
|
||||
|
||||
```bash
|
||||
npm run start -w @calchat/client
|
||||
```
|
||||
|
||||
Dann im Expo-Menue die gewuenschte Plattform waehlen:
|
||||
- `a` - Android Emulator
|
||||
- `i` - iOS Simulator
|
||||
- `w` - Web Browser
|
||||
|
||||
Oder direkt:
|
||||
|
||||
```bash
|
||||
npm run android -w @calchat/client
|
||||
npm run ios -w @calchat/client
|
||||
npm run web -w @calchat/client
|
||||
```
|
||||
|
||||
## CalDAV (optional)
|
||||
|
||||
Fuer CalDAV-Synchronisation kann ein Radicale-Server gestartet werden:
|
||||
|
||||
```bash
|
||||
cd apps/server/docker/radicale
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Radicale ist dann unter `localhost:5232` erreichbar. Die CalDAV-Verbindung wird in der App unter Einstellungen konfiguriert.
|
||||
|
||||
## Weitere Befehle
|
||||
|
||||
```bash
|
||||
npm run format # Prettier auf alle TS/TSX-Dateien
|
||||
npm run lint -w @calchat/client # ESLint (Client)
|
||||
npm run build -w @calchat/server # TypeScript kompilieren (Server)
|
||||
npm run build:apk -w @calchat/client # APK lokal bauen (EAS)
|
||||
```
|
||||
|
||||
## Projektstruktur
|
||||
|
||||
```
|
||||
calchat/
|
||||
├── apps/
|
||||
│ ├── client/ # Expo React Native App
|
||||
│ └── server/ # Express.js Backend
|
||||
│ └── docker/
|
||||
│ ├── mongo/ # MongoDB + Mongo Express
|
||||
│ └── radicale/ # CalDAV Server
|
||||
└── packages/
|
||||
└── shared/ # Geteilte Types und Utilities
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user