Skip to content
Merged
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
31 changes: 31 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ==================================
# DevRadar Environment Configuration
# ==================================

# Node Environment
NODE_ENV=development

# Server Configuration
PORT=3000
HOST=localhost

# Database (PostgreSQL)
DATABASE_URL=postgresql://devradar:devradar@localhost:5432/devradar?schema=public

# Redis
REDIS_URL=redis://localhost:6379

# GitHub OAuth
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_CALLBACK_URL=http://localhost:3000/auth/callback

# JWT
JWT_SECRET=your_super_secret_jwt_key_change_in_production
JWT_EXPIRES_IN=7d

# WebSocket
WS_PORT=3001

# Logging
LOG_LEVEL=debug
47 changes: 47 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
day: 'monday'
time: '09:00'
timezone: 'UTC'
open-pull-requests-limit: 10
groups:
dev-dependencies:
dependency-type: 'development'
update-types:
- 'minor'
- 'patch'
production-dependencies:
dependency-type: 'production'
update-types:
- 'patch'
labels:
- 'dependencies'
- 'automated'
commit-message:
prefix: 'deps'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
day: 'monday'
labels:
- 'ci'
- 'automated'
commit-message:
prefix: 'ci'

- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'weekly'
day: 'monday'
labels:
- 'docker'
- 'automated'
commit-message:
prefix: 'docker'
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check formatting
run: pnpm format:check

- name: Lint
run: pnpm lint

- name: Type check
run: pnpm check-types

- name: Build
run: pnpm build

- name: Test
run: pnpm test
env:
CI: true

security:
name: Security Scan
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Audit dependencies
run: pnpm audit --audit-level high
continue-on-error: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: typescript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 1.0.0)'
required: true
type: string

concurrency:
group: release
cancel-in-progress: false

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
# Set release version from tag or manual input
RELEASE_VERSION: ${{ github.event.inputs.version || github.ref_name }}

jobs:
release:
name: Build and Publish
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build all packages
run: pnpm build

- name: Run tests
run: pnpm test
env:
CI: true

# Extension packaging (will be configured in Phase 1)
# - name: Package VS Code Extension
# run: pnpm --filter @devradar/extension package

# - name: Publish to VS Code Marketplace
# run: pnpm --filter @devradar/extension publish
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', env.RELEASE_VERSION) || github.ref_name }}
generate_release_notes: true
# files: |
# apps/extension/*.vsix
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Dependencies
node_modules/
.pnpm-store/

# Build outputs
dist/
build/
.next/
out/
*.tsbuildinfo

# Turbo
.turbo/

# Environment
.env
.env.local
.env.*.local
!.env.example

# IDE
.idea/
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

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

# Testing
coverage/

# VS Code Extension
*.vsix

# Docker
docker-compose.override.yml
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.12.0
38 changes: 38 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Dependencies and build outputs
node_modules/
dist/
build/
.next/
coverage/
.turbo/

# Lock files (already formatted by package managers)
pnpm-lock.yaml
package-lock.json
yarn.lock
*.lock

# VS Code extension builds
*.vsix

# Environment files
.env
.env.local
.env.*.local

# IDE and editor files
.idea/
.vscode/
*.swp
*.swo

# OS files
.DS_Store
Thumbs.db

# Logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next",
"bradlc.vscode-tailwindcss",
"prisma.prisma",
"Orta.vscode-jest",
"ms-azuretools.vscode-docker",
"GitHub.copilot",
"eamodio.gitlens"
]
}
Loading
Loading