mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
Refine development environment setup instructions in README.md
This commit is contained in:
58
README.md
58
README.md
@@ -15,21 +15,19 @@ This app is currently deployed using Cloudflare Pages. The logs can be viewed wi
|
|||||||
|
|
||||||
## Development Environment Setup
|
## Development Environment Setup
|
||||||
|
|
||||||
For detailed setup instructions, including container building, environment configuration, and troubleshooting, see [ENVIRONMENT_SETUP.md](ENVIRONMENT_SETUP.md).
|
For detailed setup instructions, including container building, environment configuration, authentication, and troubleshooting, see [ENVIRONMENT_SETUP.md](ENVIRONMENT_SETUP.md).
|
||||||
|
|
||||||
### GitHub MCP Server
|
### Quick Start
|
||||||
The project uses GitHub's MCP server for development tasks. The server runs in a Docker container and is automatically configured when you open the project in a devcontainer.
|
|
||||||
|
|
||||||
#### Configuration
|
1. **Prerequisites**
|
||||||
- The MCP server uses GitHub authentication via Personal Access Token
|
- Docker Desktop installed and running
|
||||||
- Token is stored securely in `.devcontainer/.env` (not committed to repository)
|
- VS Code with Remote - Containers extension
|
||||||
- GitHub CLI is installed in the devcontainer for easier authentication management
|
- GitHub account with Personal Access Token (PAT)
|
||||||
- Container health monitoring is configured
|
|
||||||
|
|
||||||
#### Usage
|
2. **Setup Steps**
|
||||||
The MCP server will automatically start when you open the project in a devcontainer. If you need to manually authenticate:
|
- Clone this repository
|
||||||
1. Run `gh auth login` in the terminal
|
- Copy `.devcontainer/.env.example` to `.devcontainer/.env` and add your GitHub PAT
|
||||||
2. Follow the prompts to authenticate with your GitHub account
|
- Open in VS Code and select "Reopen in Container" when prompted
|
||||||
|
|
||||||
### Database Setup
|
### Database Setup
|
||||||
|
|
||||||
@@ -78,39 +76,3 @@ import type { Transaction } from '@types';
|
|||||||
// ❌ DON'T use relative imports like this
|
// ❌ DON'T use relative imports like this
|
||||||
import { transactionService } from '../../../../data/db.service';
|
import { transactionService } from '../../../../data/db.service';
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development Container Setup
|
|
||||||
|
|
||||||
### GitHub Personal Access Token
|
|
||||||
Before using the development container, you'll need a GitHub Personal Access Token (PAT) with the following permissions:
|
|
||||||
- `repo` (Full control of private repositories)
|
|
||||||
- `read:packages` (Download container images)
|
|
||||||
- `write:packages` (Upload container images)
|
|
||||||
- `delete:packages` (Optional: manage container versions)
|
|
||||||
- `workflow` (GitHub Actions integration)
|
|
||||||
|
|
||||||
### Using the Development Container
|
|
||||||
|
|
||||||
#### Command Line Interface
|
|
||||||
You can build and start the development container using the devcontainer CLI:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build the container
|
|
||||||
devcontainer build .
|
|
||||||
|
|
||||||
# Start the container (with post-create command)
|
|
||||||
devcontainer up --workspace-folder .
|
|
||||||
|
|
||||||
# Start the container (skip post-create)
|
|
||||||
devcontainer up --workspace-folder . --skip-post-create
|
|
||||||
```
|
|
||||||
|
|
||||||
#### VS Code
|
|
||||||
1. Open the project in VS Code
|
|
||||||
2. Press F1 and run "Dev Containers: Rebuild and Reopen in Container"
|
|
||||||
- To skip post-create steps: Press F1 and run "Dev Containers: Rebuild Container Without Cache"
|
|
||||||
|
|
||||||
### Troubleshooting
|
|
||||||
- If GitHub authentication fails, ensure your PAT is correctly set in `.devcontainer/.env`
|
|
||||||
- For network issues, try rebuilding the container with `--no-cache` option
|
|
||||||
- Check the VS Code "Dev Containers" output panel for detailed logs
|
|
||||||
Reference in New Issue
Block a user