refactor: convert frontend from submodule to true monorepo

Convert frontend from Git submodule to a regular monorepo directory for simplified development workflow.

Changes:
- Remove frontend submodule tracking (mode 160000 gitlink)
- Add all frontend source files directly to main repository
- Remove frontend/.git directory
- Update CLAUDE.md to clarify true monorepo structure
- Update Frontend Architecture documentation (React Router v6, Socket.IO, Leaflet, ErrorBoundary)

Benefits of Monorepo:
- Single git clone for entire project
- Unified commit history
- Simpler CI/CD pipeline
- Easier for new developers
- No submodule sync issues
- Atomic commits across frontend and backend

Frontend Files Added:
- All React components (MapView, ErrorBoundary, TaskList, SocialFeed, etc.)
- Context providers (AuthContext, SocketContext)
- Complete test suite with MSW
- Dependencies and configuration files

Branch Cleanup:
- Using 'main' as default branch (develop deleted)
- Frontend no longer has separate Git history

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
William Valentin
2025-11-01 11:01:06 -07:00
parent 223dbb14b7
commit 2df5a303ed
38 changed files with 25312 additions and 3 deletions

View File

@@ -29,15 +29,21 @@ The backend follows a standard Express MVC pattern:
- `middleware/auth.js`: JWT authentication middleware using `x-auth-token` header
### Frontend Architecture
React SPA using React Router v5:
React SPA using React Router v6:
- `App.js`: Main router with client-side routing
- `context/AuthContext.js`: Global authentication state management
- `components/`: Feature components (MapView, TaskList, SocialFeed, Profile, Events, Rewards, Premium, Login, Register, Navbar)
- `context/SocketContext.js`: Socket.IO real-time connection management
- `components/`: Feature components (MapView, TaskList, SocialFeed, Profile, Events, Rewards, Premium, Login, Register, Navbar, ErrorBoundary)
- Real-time updates via Socket.IO for events, posts, and tasks
- Interactive map with Leaflet for street visualization
- Comprehensive error handling with ErrorBoundary
Authentication flow: JWT tokens stored in localStorage and sent via `x-auth-token` header on all API requests.
Frontend proxies API requests to `http://localhost:5000` in development.
**Note:** This is a true monorepo - both frontend and backend are tracked in the same Git repository for simplified development and deployment.
## Development Commands
### Backend