refactor: rename package scope from @caldav to @calchat
Rename all workspace packages to reflect the actual project name: - @caldav/client -> @calchat/client - @caldav/server -> @calchat/server - @caldav/shared -> @calchat/shared - Root package: caldav-mono -> calchat-mono Update all import statements across client and server to use the new package names. Update default MongoDB database name and logging service identifier accordingly.
This commit is contained in:
26
CLAUDE.md
26
CLAUDE.md
@@ -18,19 +18,19 @@ npm run format # Format all TypeScript files with Prettier
|
||||
|
||||
### Client (apps/client) - Expo React Native app
|
||||
```bash
|
||||
npm run start -w @caldav/client # Start Expo dev server
|
||||
npm run android -w @caldav/client # Start on Android
|
||||
npm run ios -w @caldav/client # Start on iOS
|
||||
npm run web -w @caldav/client # Start web version
|
||||
npm run lint -w @caldav/client # Run ESLint
|
||||
npm run build:apk -w @caldav/client # Build APK locally with EAS
|
||||
npm run start -w @calchat/client # Start Expo dev server
|
||||
npm run android -w @calchat/client # Start on Android
|
||||
npm run ios -w @calchat/client # Start on iOS
|
||||
npm run web -w @calchat/client # Start web version
|
||||
npm run lint -w @calchat/client # Run ESLint
|
||||
npm run build:apk -w @calchat/client # Build APK locally with EAS
|
||||
```
|
||||
|
||||
### Server (apps/server) - Express.js backend
|
||||
```bash
|
||||
npm run dev -w @caldav/server # Start dev server with hot reload (tsx watch)
|
||||
npm run build -w @caldav/server # Compile TypeScript
|
||||
npm run start -w @caldav/server # Run compiled server (port 3000)
|
||||
npm run dev -w @calchat/server # Start dev server with hot reload (tsx watch)
|
||||
npm run build -w @calchat/server # Compile TypeScript
|
||||
npm run start -w @calchat/server # Run compiled server (port 3000)
|
||||
```
|
||||
|
||||
## Technology Stack
|
||||
@@ -57,9 +57,9 @@ npm run start -w @caldav/server # Run compiled server (port 3000)
|
||||
|
||||
### Workspace Structure
|
||||
```
|
||||
apps/client - @caldav/client - Expo React Native app
|
||||
apps/server - @caldav/server - Express.js backend
|
||||
packages/shared - @caldav/shared - Shared TypeScript types and models
|
||||
apps/client - @calchat/client - Expo React Native app
|
||||
apps/server - @calchat/server - Express.js backend
|
||||
packages/shared - @calchat/shared - Shared TypeScript types and models
|
||||
```
|
||||
|
||||
### Frontend Architecture (apps/client)
|
||||
@@ -410,7 +410,7 @@ NODE_ENV=development # development = pretty logs, production = JSON
|
||||
|
||||
### Local APK Build with EAS
|
||||
```bash
|
||||
npm run build:apk -w @caldav/client
|
||||
npm run build:apk -w @calchat/client
|
||||
```
|
||||
|
||||
This uses the `preview` profile from `eas.json` which builds an APK with:
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
"expo": {
|
||||
"jsEngine": "hermes",
|
||||
"name": "CalChat",
|
||||
"slug": "caldav",
|
||||
"slug": "calchat",
|
||||
"version": "1.0.0",
|
||||
"orientation": "portrait",
|
||||
"scheme": "caldav",
|
||||
"scheme": "calchat",
|
||||
"userInterfaceStyle": "automatic",
|
||||
"newArchEnabled": true,
|
||||
"ios": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@caldav/client",
|
||||
"name": "@calchat/client",
|
||||
"main": "expo-router/entry",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
@@ -12,7 +12,7 @@
|
||||
"build:apk": "eas build --platform android --profile preview --local"
|
||||
},
|
||||
"dependencies": {
|
||||
"@caldav/shared": "*",
|
||||
"@calchat/shared": "*",
|
||||
"@expo/vector-icons": "^15.0.3",
|
||||
"@react-navigation/bottom-tabs": "^7.4.0",
|
||||
"@react-navigation/elements": "^2.6.3",
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ScrollView,
|
||||
Alert,
|
||||
} from "react-native";
|
||||
import { DAYS, MONTHS, Month, ExpandedEvent } from "@caldav/shared";
|
||||
import { DAYS, MONTHS, Month, ExpandedEvent } from "@calchat/shared";
|
||||
import Header from "../../components/Header";
|
||||
import { EventCard } from "../../components/EventCard";
|
||||
import React, {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
chatMessageToMessageData,
|
||||
MessageData,
|
||||
} from "../../stores";
|
||||
import { ProposedEventChange } from "@caldav/shared";
|
||||
import { ProposedEventChange } from "@calchat/shared";
|
||||
import { ProposedEventCard } from "../../components/ProposedEventCard";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { View, Pressable } from "react-native";
|
||||
import { ExpandedEvent } from "@caldav/shared";
|
||||
import { ExpandedEvent } from "@calchat/shared";
|
||||
import { Feather } from "@expo/vector-icons";
|
||||
import currentTheme from "../Themes";
|
||||
import { EventCardBase } from "./EventCardBase";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { View, Text, Modal, Pressable } from "react-native";
|
||||
import { CreateEventDTO } from "@caldav/shared";
|
||||
import { CreateEventDTO } from "@calchat/shared";
|
||||
|
||||
type EventConfirmDialogProps = {
|
||||
visible: boolean;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { View, Text, Pressable } from "react-native";
|
||||
import { ProposedEventChange } from "@caldav/shared";
|
||||
import { ProposedEventChange } from "@calchat/shared";
|
||||
import currentTheme from "../Themes";
|
||||
import { EventCardBase } from "./EventCardBase";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LoginDTO, CreateUserDTO, AuthResponse } from "@caldav/shared";
|
||||
import { LoginDTO, CreateUserDTO, AuthResponse } from "@calchat/shared";
|
||||
import { ApiClient } from "./ApiClient";
|
||||
import { useAuthStore } from "../stores";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
CreateEventDTO,
|
||||
UpdateEventDTO,
|
||||
EventAction,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { ApiClient } from "./ApiClient";
|
||||
|
||||
interface ConfirmEventRequest {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
CreateEventDTO,
|
||||
UpdateEventDTO,
|
||||
ExpandedEvent,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { ApiClient } from "./ApiClient";
|
||||
|
||||
export const EventService = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { create } from "zustand";
|
||||
import { Platform } from "react-native";
|
||||
import { User } from "@caldav/shared";
|
||||
import { User } from "@calchat/shared";
|
||||
import * as SecureStore from "expo-secure-store";
|
||||
|
||||
const USER_STORAGE_KEY = "auth_user";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { create } from "zustand";
|
||||
import { ChatMessage, ProposedEventChange } from "@caldav/shared";
|
||||
import { ChatMessage, ProposedEventChange } from "@calchat/shared";
|
||||
|
||||
type BubbleSide = "left" | "right";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { create } from "zustand";
|
||||
import { ExpandedEvent } from "@caldav/shared";
|
||||
import { ExpandedEvent } from "@calchat/shared";
|
||||
|
||||
interface EventsState {
|
||||
events: ExpandedEvent[];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@caldav/server",
|
||||
"name": "@calchat/server",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -8,7 +8,7 @@
|
||||
"start": "node dist/app.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@caldav/shared": "*",
|
||||
"@calchat/shared": "*",
|
||||
"bcrypt": "^6.0.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^5.2.1",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import OpenAI from "openai";
|
||||
import { ProposedEventChange } from "@caldav/shared";
|
||||
import { ProposedEventChange } from "@calchat/shared";
|
||||
import { AIProvider, AIContext, AIResponse } from "../services/interfaces";
|
||||
import {
|
||||
buildSystemPrompt,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CalendarEvent } from "@caldav/shared";
|
||||
import { CalendarEvent } from "@calchat/shared";
|
||||
|
||||
// German date/time formatting helpers
|
||||
export const formatDate = (d: Date) => d.toLocaleDateString("de-DE");
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
getDay,
|
||||
Day,
|
||||
DAY_TO_GERMAN,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { AIContext } from "../../services/interfaces";
|
||||
import { formatDate, formatTime, formatDateTime } from "./eventFormatter";
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { logger } from "./logging";
|
||||
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
const mongoUri = process.env.MONGODB_URI || "mongodb://localhost:27017/caldav";
|
||||
const mongoUri = process.env.MONGODB_URI || "mongodb://localhost:27017/calchat";
|
||||
|
||||
// Middleware
|
||||
app.use(express.json());
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
UpdateEventDTO,
|
||||
EventAction,
|
||||
GetMessagesOptions,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { ChatService } from "../services";
|
||||
import { createLogger } from "../logging";
|
||||
import { AuthenticatedRequest } from "./AuthMiddleware";
|
||||
|
||||
@@ -32,7 +32,7 @@ export const logger = pino({
|
||||
}
|
||||
: undefined,
|
||||
base: {
|
||||
service: "caldav-server",
|
||||
service: "calchat-server",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
CreateMessageDTO,
|
||||
GetMessagesOptions,
|
||||
UpdateMessageDTO,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { ChatRepository } from "../../services/interfaces";
|
||||
import { Logged } from "../../logging";
|
||||
import { ChatMessageModel, ConversationModel } from "./models";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CalendarEvent, CreateEventDTO, UpdateEventDTO } from "@caldav/shared";
|
||||
import { CalendarEvent, CreateEventDTO, UpdateEventDTO } from "@calchat/shared";
|
||||
import { EventRepository } from "../../services/interfaces";
|
||||
import { Logged } from "../../logging";
|
||||
import { EventModel } from "./models";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User } from "@caldav/shared";
|
||||
import { User } from "@calchat/shared";
|
||||
import { UserRepository, CreateUserData } from "../../services/interfaces";
|
||||
import { Logged } from "../../logging";
|
||||
import { UserModel, UserDocument } from "./models";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
CreateEventDTO,
|
||||
UpdateEventDTO,
|
||||
ProposedEventChange,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { IdVirtual } from "./types";
|
||||
|
||||
export interface ChatMessageDocument extends Omit<ChatMessage, "id">, Document {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import mongoose, { Schema, Document, Model } from "mongoose";
|
||||
import { CalendarEvent } from "@caldav/shared";
|
||||
import { CalendarEvent } from "@calchat/shared";
|
||||
import { IdVirtual } from "./types";
|
||||
|
||||
export interface EventDocument extends Omit<CalendarEvent, "id">, Document {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import mongoose, { Schema, Document, Model } from "mongoose";
|
||||
import { User } from "@caldav/shared";
|
||||
import { User } from "@calchat/shared";
|
||||
import { IdVirtual } from "./types";
|
||||
|
||||
export interface UserDocument extends Omit<User, "id">, Document {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User, CreateUserDTO, LoginDTO, AuthResponse } from "@caldav/shared";
|
||||
import { User, CreateUserDTO, LoginDTO, AuthResponse } from "@calchat/shared";
|
||||
import { UserRepository } from "./interfaces";
|
||||
import * as jwt from "../utils/jwt";
|
||||
import * as password from "../utils/password";
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
UpdateEventDTO,
|
||||
EventAction,
|
||||
CreateMessageDTO,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { ChatRepository, EventRepository, AIProvider } from "./interfaces";
|
||||
import { getWeeksOverview, getMonthOverview } from "../utils/eventFormatters";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
CreateEventDTO,
|
||||
UpdateEventDTO,
|
||||
ExpandedEvent,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { EventRepository } from "./interfaces";
|
||||
import { expandRecurringEvents } from "../utils/recurrenceExpander";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
CalendarEvent,
|
||||
ChatMessage,
|
||||
ProposedEventChange,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
|
||||
export interface AIContext {
|
||||
userId: string;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
CreateMessageDTO,
|
||||
GetMessagesOptions,
|
||||
UpdateMessageDTO,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
|
||||
export interface ChatRepository {
|
||||
// Conversations
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CalendarEvent, CreateEventDTO, UpdateEventDTO } from "@caldav/shared";
|
||||
import { CalendarEvent, CreateEventDTO, UpdateEventDTO } from "@calchat/shared";
|
||||
|
||||
export interface EventRepository {
|
||||
findById(id: string): Promise<CalendarEvent | null>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User } from "@caldav/shared";
|
||||
import { User } from "@calchat/shared";
|
||||
|
||||
export interface CreateUserData {
|
||||
email: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
DAY_TO_GERMAN_SHORT,
|
||||
MONTH_TO_GERMAN,
|
||||
ExpandedEvent,
|
||||
} from "@caldav/shared";
|
||||
} from "@calchat/shared";
|
||||
import { EventRepository } from "../services/interfaces";
|
||||
import { expandRecurringEvents } from "./recurrenceExpander";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RRule, rrulestr } from "rrule";
|
||||
import { CalendarEvent, ExpandedEvent } from "@caldav/shared";
|
||||
import { CalendarEvent, ExpandedEvent } from "@calchat/shared";
|
||||
|
||||
// Convert local time to "fake UTC" for rrule
|
||||
// rrule interprets all dates as UTC internally, so we need to trick it
|
||||
|
||||
3273
package-lock.json
generated
3273
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "caldav-mono",
|
||||
"name": "calchat-mono",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@caldav/shared",
|
||||
"name": "@calchat/shared",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
|
||||
Reference in New Issue
Block a user