Initial commit
Node.js CI / build (18.x) (push) Failing after 6m31s
Node.js CI / build (20.x) (push) Failing after 3h14m55s

feat: scaffolded basic auth login and dashboard(empty)
This commit is contained in:
2025-09-20 00:40:19 -07:00
commit 162a38aca3
32 changed files with 6761 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# AI Collaboration Guide for the Noteplace Project
This document outlines the preferred working style and conventions for AI collaboration on this project, based on initial interactions and feedback.
## 1. Core Philosophy: Incremental, Verifiable Milestones
- **Break It Down**: Do not attempt to implement large, complex features in a single step. Decompose work into the smallest possible, verifiable milestones.
- **No Mocks in Milestones**: A milestone is only considered "done" when its features are fully functional and integrated with the live backend API. Mocked implementations are only acceptable as a temporary step *within* a milestone, not as the final deliverable for one.
- **Test Before Moving On**: After a feature is implemented, it must be tested and verified before starting the next task.
## 2. The "Polish Phase"
After a functional milestone is complete, a dedicated "polish phase" is required. This is a critical step and should not be skipped. This phase includes:
- **Documentation**: Update the `README.md`, `docs/WORKLOG.md`, and any other relevant documentation.
- **Testing**: Add unit or integration tests for the new functionality. The preferred framework for the frontend is `vitest`.
- **Code Quality**: Clean up any temporary or "useless" code. Refactor to improve clarity and maintainability.
- **Production Readiness**: Remove hardcoded values (e.g., URLs, tokens) and replace them with environment variables.
- **Repository Health**: Ensure the repository is well-structured. This includes adding or updating files like `.gitignore` and CI/CD workflows.
## 3. Backend & Environment Interaction
- **Backend is Truth**: The Go backend is the source of truth. Before implementing a frontend feature, verify that the required backend endpoint exists and functions as expected.
- **Identify Backend Gaps**: If a required backend feature is missing (e.g., a web auth endpoint for a web app), the AI must:
1. Clearly identify and explain the gap.
2. Propose the correct, standard solution.
3. Offer to implement the necessary changes in the backend code.
- **Handle Environment Constraints**: The development environment may have limitations (e.g., shell commands like `npm` failing). The AI should not get stuck. It should diagnose the issue, and if it cannot be resolved, propose a manual workaround (like editing `package.json` directly) and clearly ask the user for help with running the required commands (e.g., `npm install`).
## 4. Project-Specific Conventions
- **CI/CD**: The project uses both **GitHub Actions** and **Gitea**. When adding a CI/CD workflow, create configuration files for both systems (`.github/workflows/` and `.gitea/workflows/`).
- **Backend Logging**: When modifying backend code, add meaningful logs using the existing `zap` logger to trace the execution flow.
- **User-AI Interaction**: The user prefers clear, step-by-step explanations, especially for complex topics (like OAuth2). The AI should be proactive in its explanations and planning.
+49
View File
@@ -0,0 +1,49 @@
# Project Work Log
This document tracks the planned milestones for the Noteplace frontend project.
---
### ✅ Milestone 1: Authentication & Project Setup
**Status: Complete**
- **Functionality**: Users can log in via a full, backend-integrated Google OAuth2 flow and are directed to a protected dashboard. Session persists across page refreshes.
- **Project Health**: The repository is clean, includes a `.gitignore`, has CI/CD workflows for both GitHub and Gitea, and has unit tests for the authentication context.
- **Configuration**: Key URLs are configurable via environment variables in both the frontend and backend.
---
### ⏳ Milestone 2: Display Places
**Status: Next Up**
1. **API Service**: Create a centralized API service file to manage all `fetch` calls to the backend.
2. **Fetch Places**: Implement a `getPlaces()` function that calls the `/api/places` endpoint.
3. **Place Component**: Create a `PlaceCard.tsx` component to display the information for a single place (name, category, address).
4. **Update Dashboard**: Modify the `DashboardPage.tsx` to:
- Fetch the list of all places when the component mounts.
- Display a loading state while fetching.
- Display an error state if the fetch fails.
- Render the list of places using the `PlaceCard` component.
---
### 📝 Milestone 3: Place Details & Ratings View
**Status: Planned**
1. **Routing**: Add a new dynamic route for `/places/:id`.
2. **Place Detail Page**: Create a `PlaceDetailPage.tsx` component.
3. **Navigation**: Make each `PlaceCard` from the dashboard link to its corresponding detail page.
4. **Fetch Details**: On the detail page, fetch and display the specific place's information from `/api/places/:id`.
5. **Display Ratings**: Fetch all ratings for the place from `/api/places/:id/ratings` and display them.
---
### 🔭 Future Milestones (High-Level)
- **Place CRUD**: Implement forms and API calls for creating, updating, and deleting places.
- **Rating CRUD**: Implement the full workflow for adding, updating, and deleting ratings, including the on-the-fly attribute creation we discussed.
- **PWA Features**: Add a service worker and web app manifest to make the application fully installable and provide offline capabilities.
- **UI/UX Polish**: Refine the user interface with improved styling, animations, and potentially a dark mode.