Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Backend Environment Variables
NODE_ENV=development
DATABASE_URL=postgresql://user:password@db:5432/acme_db

OPENAI_API_KEY=YOUR_OPEN_AI_API_KEY_HERE
ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY_HERE
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"root": true,
"extends": ["eslint-config-base"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
}
}
}
75 changes: 75 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# GitHub Copilot Instructions for Turborepo Monorepo

## Core Guidelines

1. **Check Documentation First**
- Always reference the `docs/` folder for technology-specific guides and patterns
- Follow the README.md for setup, testing, and development instructions
- Consult official documentation when uncertain

2. **Code Quality**
- Run `npm run format` to format code automatically
- Run `npm run lint:fix` to fix linting issues
- Keep code clean, typed, and well-structured
- Use TypeScript properly and avoid `any` types

3. **Monorepo Structure**
- Follow the established package organization in `apps/` and `packages/`
- Check `docs/PROJECT_STRUCTURE.md` for monorepo patterns
- Keep packages focused and well-defined
- Use workspace dependencies appropriately

4. **Development Workflow**
- Test changes using the commands in README.md
- Follow the project's established patterns and conventions
- Reference existing code for consistency
- Use Turborepo's caching and task orchestration

5. **Best Practices**
- Write clean, readable, and maintainable code
- Use proper error handling and validation
- Follow monorepo best practices for scalability
- Implement proper package dependencies

## When Suggesting Code

1. **Package Creation**
- Check if similar packages exist in the monorepo
- Look for relevant guides in the `docs/` folder
- Follow established package structure patterns
- Use proper package.json configuration
- Implement appropriate build and export patterns

2. **Dependency Management**
- Use workspace dependencies for internal packages
- Follow established patterns for external dependencies
- Avoid duplicate dependencies across packages
- Use proper versioning strategies

3. **Shared Code**
- Create reusable packages in `packages/` directory
- Follow established patterns for shared components
- Implement proper TypeScript exports
- Use consistent naming conventions

4. **App Development**
- Place applications in `apps/` directory
- Use shared packages appropriately
- Follow established patterns for each app type
- Implement proper build configurations

5. **Build & Development**
- Use Turborepo's task pipelines effectively
- Implement proper caching strategies
- Follow established build patterns
- Use remote caching when configured

## Turborepo Specific

- Leverage Turborepo's parallel execution and caching
- Use proper task dependencies in turbo.json
- Implement incremental builds effectively
- Follow workspace patterns for package dependencies
- Use Turborepo's remote caching when available
- Implement proper change detection for CI/CD
- Follow established patterns for package publishing
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo
dist

# Storybook
out
storybook-static/

app/
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*": ["prettier -u --write"]
}
8 changes: 8 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"MD041": false,
"MD042": false,
"MD004": false,
"MD013": false,
"MD033": false,
"MD024": false
}
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.19.4
5 changes: 5 additions & 0 deletions apps/backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
build
dist
tools
Empty file added apps/backend/.env.example
Empty file.
10 changes: 10 additions & 0 deletions apps/backend/.eslitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# /node_modules/* in the project root is ignored by default
# build artefacts
dist/*
coverage/*
node_modules/*
logs/*
prod/*
.husky/*
.github/*
tools/
76 changes: 76 additions & 0 deletions apps/backend/.github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# GitHub Copilot Instructions for NestJS Project

## Core Guidelines

1. **Check Documentation First**
- Always reference the `docs/` folder for technology-specific guides and patterns
- Follow the README.md for setup, testing, and development instructions
- Consult official documentation when uncertain

2. **Code Quality**
- Run `npm run format` to format code automatically
- Run `npm run lint:fix` to fix linting issues
- Keep code clean, typed, and well-structured
- Use TypeScript properly and avoid `any` types

3. **Project Structure**
- Follow NestJS module-based architecture
- Use proper dependency injection patterns
- Keep services, controllers, and modules organized
- Follow NestJS best practices for scalability

4. **Development Workflow**
- Test changes using the commands in README.md
- Follow the project's established patterns and conventions
- Reference existing code for consistency
- Use proper error handling and validation

5. **Best Practices**
- Write clean, readable, and maintainable code
- Use proper DTOs for data validation
- Follow REST API and GraphQL conventions
- Implement proper error responses and logging

## When Suggesting Code

1. **Module Creation**
- Check if similar modules exist in the codebase
- Look for relevant guides in the `docs/` folder
- Follow NestJS module structure patterns
- Use proper dependency injection
- Implement appropriate guards, interceptors, and pipes

2. **API Design**
- Use proper HTTP methods and status codes
- Implement comprehensive DTOs with validation
- Follow established API patterns in the project
- Use OpenAPI/Swagger decorators if configured
- Implement proper error handling

3. **Database Integration**
- Reference `docs/` for ORM/database patterns used in the project
- Follow established entity and repository patterns
- Use proper transaction handling
- Implement data validation and sanitization

4. **Authentication & Authorization**
- Follow established security patterns
- Use proper JWT handling if implemented
- Implement role-based access control appropriately
- Follow security best practices

5. **Testing**
- Suggest appropriate unit and integration tests
- Follow testing patterns established in the project
- Mock dependencies properly
- Test both success and error scenarios

## NestJS Specific

- Use decorators appropriately (@Injectable, @Controller, etc.)
- Implement proper exception filters
- Use NestJS built-in validation with class-validator
- Follow dependency injection best practices
- Implement proper logging with NestJS logger
- Use configuration management properly
- Implement health checks and monitoring
Loading