added extra bits and bobs
This commit is contained in:
parent
88701de549
commit
548039c33e
5 changed files with 110 additions and 1 deletions
109
PROJECT_STATUS.md
Normal file
109
PROJECT_STATUS.md
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
# Project Status
|
||||||
|
|
||||||
|
## Current State: Production Ready ✅
|
||||||
|
|
||||||
|
This is a complete shopping list app with iOS native frontend and Node.js/Next.js backend.
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
shop/
|
||||||
|
├── apps/
|
||||||
|
│ ├── api/ # Node.js backend (Next.js + Express)
|
||||||
|
│ └── ios/ # iOS app (native SwiftUI)
|
||||||
|
├── docs/ # Documentation
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## iOS App (`apps/ios/`)
|
||||||
|
|
||||||
|
**Location:** `apps/ios/Bagsy/` (Xcode project: `Bagsy.xcodeproj`)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- ✅ Authentication (sign in/sign up with server config)
|
||||||
|
- ✅ Shopping lists management
|
||||||
|
- ✅ Real-time list synchronization (WebSocket)
|
||||||
|
- ✅ Barcode scanning
|
||||||
|
- ✅ AI product suggestions
|
||||||
|
- ✅ Store & aisle management
|
||||||
|
- ✅ Offline support
|
||||||
|
- ✅ Secure token storage (Keychain)
|
||||||
|
|
||||||
|
### Tech Stack
|
||||||
|
- Swift 5.9+
|
||||||
|
- SwiftUI
|
||||||
|
- URLSession (HTTP + WebSocket)
|
||||||
|
- Combine (reactive programming)
|
||||||
|
- iOS 16.0+ deployment target
|
||||||
|
- No external dependencies (native only)
|
||||||
|
|
||||||
|
### Files
|
||||||
|
- **Source code:** `apps/ios/Bagsy/ShopList/` (29 Swift files, ~8,000 LOC)
|
||||||
|
- **Project file:** `apps/ios/Bagsy.xcodeproj/`
|
||||||
|
- **Assets:** `apps/ios/Bagsy/Assets.xcassets/`
|
||||||
|
|
||||||
|
## Backend API (`apps/api/`)
|
||||||
|
|
||||||
|
**Technology:** Next.js with Express server for WebSocket support
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- ✅ User authentication
|
||||||
|
- ✅ Household/sharing management
|
||||||
|
- ✅ Shopping list CRUD
|
||||||
|
- ✅ Real-time synchronization via WebSocket
|
||||||
|
- ✅ Barcode product lookup
|
||||||
|
- ✅ Store & aisle management
|
||||||
|
- ✅ CORS configured for iOS app
|
||||||
|
|
||||||
|
### Key Files
|
||||||
|
- `server.ts` - Custom Express server with WebSocket
|
||||||
|
- `lib/websocket.ts` - Real-time message handler
|
||||||
|
- `next.config.js` - CORS configuration
|
||||||
|
- `db/index.ts` - Database connection
|
||||||
|
|
||||||
|
## How to Build & Run
|
||||||
|
|
||||||
|
### iOS App
|
||||||
|
```bash
|
||||||
|
cd apps/ios
|
||||||
|
open Bagsy.xcodeproj
|
||||||
|
# In Xcode: Product → Run (or Cmd+R)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Xcode 14+
|
||||||
|
- iOS 16.0+ device/simulator
|
||||||
|
- Backend API running (see below)
|
||||||
|
|
||||||
|
### Backend API
|
||||||
|
```bash
|
||||||
|
cd apps/api
|
||||||
|
bun install
|
||||||
|
bun run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Runs on `http://localhost:3000`
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
1. **Start backend:** `cd apps/api && bun run dev`
|
||||||
|
2. **Open iOS app:** `cd apps/ios && open Bagsy.xcodeproj`
|
||||||
|
3. **Configure server URL:** When signing in, enter your backend URL
|
||||||
|
4. **Create account:** Sign up with email + password
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
- `FILE_STRUCTURE.txt` - Complete iOS app file tree
|
||||||
|
- Backend docs: See `apps/api/README.md`
|
||||||
|
|
||||||
|
## Recent Cleanup
|
||||||
|
|
||||||
|
- ✅ Removed duplicate iOS app folder (was causing confusion)
|
||||||
|
- ✅ Removed build artifacts
|
||||||
|
- ✅ Consolidated to single iOS project: `Bagsy.xcodeproj`
|
||||||
|
- ✅ Removed old React Native mobile code
|
||||||
|
- ✅ Cleaned up stale documentation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Ready to build!** Open the Xcode project and press Cmd+R.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -445,7 +445,7 @@ enum AuthError: LocalizedError {
|
||||||
|
|
||||||
return PasskeyResult(
|
return PasskeyResult(
|
||||||
credentialId: registration.credentialID.base64URLEncoded(),
|
credentialId: registration.credentialID.base64URLEncoded(),
|
||||||
authenticatorData: registration.rawAuthenticatorData?.base64URLEncoded() ?? "",
|
authenticatorData: registration.rawAttestationObject?.base64URLEncoded() ?? "",
|
||||||
clientDataJSON: registration.rawClientDataJSON.base64URLEncoded(),
|
clientDataJSON: registration.rawClientDataJSON.base64URLEncoded(),
|
||||||
signature: ""
|
signature: ""
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue