46 lines
3.7 KiB
Markdown
46 lines
3.7 KiB
Markdown
# CLAUDE.md
|
||
|
||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||
|
||
## Project Overview
|
||
The repository contains a web application that includes a user login feature. Details about the implementation, tech stack, and file structure are minimal in the current codebase. Future work should reference the `Readme.md` for the high‑level goal and explore the source files to understand the actual architecture.
|
||
|
||
## Common Development Tasks
|
||
While the exact build system is not yet visible (e.g., there is no `package.json` or Makefile in the repository at this time), the typical commands for a JavaScript/Node based webapp are:
|
||
|
||
- **Install dependencies**: `npm install` (or `yarn`/`pnpm` as appropriate)
|
||
- **Run the development server**: `npm run dev` (or the script defined in `package.json` for starting the app)
|
||
- **Run tests**: `npm test` (look for a `test` script; adjust if the project uses another test runner)
|
||
- **Run a single test**: `npm test -- <test‑file-or‑pattern>`
|
||
- **Lint the code**: `npm run lint` (or the tool specified in the project, such as `eslint` or `prettier`)
|
||
- **Build for production**: `npm run build`
|
||
|
||
> **Note**: Verify the actual command names by inspecting the `scripts` section of `package.json` or any build configuration files present in the repository.
|
||
|
||
## High‑Level Architecture Guidance
|
||
Because the repository does not currently expose a detailed file tree, the following steps are recommended for Claude Code to quickly become productive:
|
||
|
||
1. **Locate the entry point** – Search for files named `index.js`, `app.js`, `server.js`, or similar. These typically bootstrap the web server or front‑end.
|
||
2. **Identify the authentication flow** – Look for modules or routes that handle login (`/login`, `auth`, `session`). Common patterns include:
|
||
- Express.js middleware (`passport`, `express-session`)
|
||
- Front‑end form handling (React, Vue, etc.)
|
||
3. **Understand data persistence** – Search for database client usage (`mongoose`, `pg`, `sequelize`, etc.) to see where user credentials are stored.
|
||
4. **Review configuration** – Check for `.env` files, `config` directories, or environment variable usage that defines secrets, database URLs, and authentication keys.
|
||
5. **Check for tests** – Look for `__tests__`, `test`, or `spec` directories; examine test files to see the expected behavior of the login feature.
|
||
|
||
## Project‑Specific Files to Review
|
||
- `Readme.md` – Provides the high‑level goal of the project.
|
||
- Any source directories (e.g., `src/`, `server/`, `frontend/`) – Contain the implementation details.
|
||
- Configuration files (`.env.example`, `config/*.js`, `webpack.config.js`, etc.) – Define environment setup and build steps.
|
||
|
||
## Recommendations for Future Contributors
|
||
- Keep the `README.md` up to date with exact commands for installing dependencies, running the dev server, testing, linting, and building the project.
|
||
- Add a `package.json` (or equivalent) with clearly named scripts so that Claude Code can invoke common tasks without guessing.
|
||
- Document the authentication flow (e.g., which library is used, where user sessions are stored) to accelerate onboarding.
|
||
- Include a `tests/` directory with unit/integration tests for the login functionality.
|
||
|
||
## How Claude Code Should Use This File
|
||
- Use the **Common Development Tasks** section to infer which npm/Yarn scripts to run, but always verify the presence of those scripts in the project configuration before execution.
|
||
- Follow the **High‑Level Architecture Guidance** steps to explore the codebase efficiently when a user asks about implementation details.
|
||
- Update this `CLAUDE.md` whenever new build tools, scripts, or architectural components are added to the repository.
|