Skip to content

Commit f137877

Browse files
authored
Merge pull request #1 from DevanshuNEU/feat/docker-deployment-setup
Feat/docker deployment setup
2 parents 719e7ea + 54ee366 commit f137877

87 files changed

Lines changed: 13015 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CodeIntel Environment Variables
2+
# Copy this to .env and fill in your actual values
3+
4+
# OpenAI API (Required)
5+
# Get from: https://platform.openai.com/api-keys
6+
OPENAI_API_KEY=sk-...
7+
8+
# Pinecone API (Required)
9+
# Get from: https://app.pinecone.io/
10+
PINECONE_API_KEY=pcsk_...
11+
PINECONE_INDEX_NAME=codeintel
12+
13+
# Supabase (Required)
14+
# Get from: https://app.supabase.com/project/_/settings/api
15+
SUPABASE_URL=https://your-project.supabase.co
16+
SUPABASE_KEY=eyJ...
17+
18+
# Backend API
19+
API_KEY=change-this-secret-key-for-production
20+
BACKEND_API_URL=http://backend:8000
21+
22+
# Redis (auto-configured in Docker, set REDIS_URL in Railway)
23+
REDIS_HOST=redis
24+
REDIS_PORT=6379
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Bug Report
2+
description: Report a bug or issue with CodeIntel
3+
title: "[Bug]: "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the details below.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Bug Description
15+
description: What happened? What did you expect to happen?
16+
placeholder: Describe the bug clearly and concisely
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduction
22+
attributes:
23+
label: Steps to Reproduce
24+
description: How can we reproduce this issue?
25+
placeholder: |
26+
1. Run command...
27+
2. Click on...
28+
3. See error...
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: logs
34+
attributes:
35+
label: Error Logs
36+
description: Paste any relevant error messages or logs
37+
render: shell
38+
placeholder: Paste logs here
39+
40+
- type: dropdown
41+
id: component
42+
attributes:
43+
label: Component
44+
description: Which part of CodeIntel is affected?
45+
options:
46+
- Backend API
47+
- Frontend UI
48+
- MCP Server
49+
- Dependency Analysis
50+
- Search/Indexing
51+
- Other
52+
validations:
53+
required: true
54+
55+
- type: input
56+
id: version
57+
attributes:
58+
label: Version
59+
description: Which version of CodeIntel are you using?
60+
placeholder: v0.2.0 or commit SHA
61+
62+
- type: textarea
63+
id: environment
64+
attributes:
65+
label: Environment
66+
description: System information
67+
placeholder: |
68+
- OS: macOS 14.1
69+
- Python: 3.11.5
70+
- Node: 20.10.0
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement", "needs-discussion"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Have an idea to make CodeIntel better? We'd love to hear it!
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: What problem does this feature solve?
16+
placeholder: Describe the pain point or use case
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: How would you solve this?
25+
placeholder: Describe your ideal solution
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: Any other approaches you've thought about?
34+
placeholder: Other ways to solve this
35+
36+
- type: dropdown
37+
id: component
38+
attributes:
39+
label: Component
40+
description: Which part would this affect?
41+
options:
42+
- MCP Tools
43+
- Search & Indexing
44+
- Dependency Analysis
45+
- Code Style Analysis
46+
- Frontend UI
47+
- Performance
48+
- Documentation
49+
- Other
50+
validations:
51+
required: true
52+
53+
- type: checkboxes
54+
id: contribution
55+
attributes:
56+
label: Contribution
57+
description: Would you be interested in implementing this?
58+
options:
59+
- label: I'd like to work on this feature

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Description
2+
3+
<!-- Describe your changes in detail -->
4+
5+
## Motivation
6+
7+
<!-- Why is this change needed? What problem does it solve? -->
8+
<!-- Link to related issues: Fixes #123 -->
9+
10+
## Type of Change
11+
12+
- [ ] Bug fix (non-breaking change that fixes an issue)
13+
- [ ] New feature (non-breaking change that adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
15+
- [ ] Documentation update
16+
- [ ] Performance improvement
17+
- [ ] Code refactoring
18+
19+
## Testing
20+
21+
<!-- How did you test your changes? -->
22+
23+
- [ ] Added new tests
24+
- [ ] All existing tests pass
25+
- [ ] Tested manually with the following scenarios:
26+
27+
## Checklist
28+
29+
- [ ] My code follows the project's code style
30+
- [ ] I have commented my code where necessary
31+
- [ ] I have updated the documentation accordingly
32+
- [ ] My changes generate no new warnings
33+
- [ ] I have added tests that prove my fix/feature works
34+
- [ ] New and existing tests pass locally
35+
- [ ] I have checked my code for security issues
36+
37+
## Screenshots (if applicable)
38+
39+
<!-- Add screenshots to demonstrate UI changes -->
40+
41+
## Additional Context
42+
43+
<!-- Any other information that reviewers should know -->

.github/workflows/ci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-backend:
11+
name: Backend Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
cache: 'pip'
22+
23+
- name: Install dependencies
24+
working-directory: ./backend
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest pytest-cov httpx
28+
pip install -r requirements.txt
29+
30+
- name: Run tests
31+
working-directory: ./backend
32+
env:
33+
DEBUG: "true"
34+
API_KEY: "test-secret-key"
35+
run: |
36+
pytest tests/ -v --cov=services --cov-report=term-missing
37+
38+
- name: Check code quality
39+
working-directory: ./backend
40+
run: |
41+
pip install flake8
42+
flake8 services/ --max-line-length=120 --ignore=E501,W503 || true
43+
44+
test-frontend:
45+
name: Frontend Tests
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Set up Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: '20'
55+
cache: 'npm'
56+
cache-dependency-path: './frontend/package-lock.json'
57+
58+
- name: Install dependencies
59+
working-directory: ./frontend
60+
run: npm ci
61+
62+
- name: Build frontend
63+
working-directory: ./frontend
64+
run: npm run build
65+
66+
- name: Check TypeScript
67+
working-directory: ./frontend
68+
run: npx tsc --noEmit
69+
70+
security-scan:
71+
name: Security Scan
72+
runs-on: ubuntu-latest
73+
continue-on-error: true # Don't fail build on security warnings
74+
75+
steps:
76+
- uses: actions/checkout@v4
77+
with:
78+
fetch-depth: 0 # Full history for TruffleHog
79+
80+
- name: Run Trivy vulnerability scanner
81+
uses: aquasecurity/trivy-action@master
82+
with:
83+
scan-type: 'fs'
84+
scan-ref: '.'
85+
format: 'table'
86+
exit-code: '0'
87+
88+
- name: Check for secrets
89+
uses: trufflesecurity/trufflehog@main
90+
continue-on-error: true # Don't fail on false positives
91+
with:
92+
path: ./
93+
base: main
94+
head: HEAD
95+
96+
lint:
97+
name: Lint Code
98+
runs-on: ubuntu-latest
99+
continue-on-error: true # Don't fail build on style issues
100+
101+
steps:
102+
- uses: actions/checkout@v4
103+
104+
- name: Lint Python
105+
uses: py-actions/flake8@v2
106+
continue-on-error: true
107+
with:
108+
path: "backend/services"
109+
max-line-length: "120"
110+
ignore: "E501,W503"

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Python
2+
__pycache__/
3+
*.pyc
4+
venv/
5+
env/
6+
7+
# Node
8+
node_modules/
9+
dist/
10+
11+
# Environment
12+
.env
13+
.env.local
14+
backend/.env
15+
backend/.env.local
16+
mcp-server/.env
17+
mcp-server/.env.local
18+
19+
# IDE
20+
.vscode/
21+
.idea/
22+
*.swp
23+
24+
# OS
25+
.DS_Store
26+
27+
# Cloned repos
28+
backend/repos/
29+
!backend/repos/.gitkeep
30+
31+
# MCP Server
32+
mcp-server/__pycache__/

CODE_OF_CONDUCT.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We're committed to making CodeIntel an open, welcoming, and harassment-free project for everyone.
6+
7+
## Standards
8+
9+
**Expected Behavior:**
10+
- Be respectful and constructive
11+
- Welcome newcomers and help them learn
12+
- Accept constructive criticism gracefully
13+
- Focus on what's best for the community
14+
- Show empathy towards others
15+
16+
**Unacceptable Behavior:**
17+
- Harassment, trolling, or personal attacks
18+
- Publishing others' private information
19+
- Spam or off-topic discussions
20+
- Any conduct that's unprofessional or unwelcoming
21+
22+
## Enforcement
23+
24+
Project maintainers have the right to remove comments, commits, code, issues, and other contributions that don't align with this Code of Conduct.
25+
26+
Instances of abusive behavior may be reported by opening an issue or contacting the project team.
27+
28+
## Attribution
29+
30+
Inspired by the Contributor Covenant, version 2.1.
31+
32+
## Summary
33+
34+
**TL;DR:** Be excellent to each other. We're here to build useful tools, not drama.

0 commit comments

Comments
 (0)