|
1 | | -# DevRadar 🛰️ |
| 1 | +# devradar |
2 | 2 |
|
3 | | -**The "Discord" for VS Code** — Real-time social presence for developers. |
| 3 | +real-time social presence for developers. |
4 | 4 |
|
5 | | -> Coding is lonely. DevRadar makes it a multiplayer experience without the friction of screen sharing. |
| 5 | +## quick start |
6 | 6 |
|
7 | | -[](https://marketplace.visualstudio.com) |
8 | | -[](./LICENSE) |
9 | | -[](https://github.com/devradar/devradar/actions) |
10 | | - |
11 | | ---- |
12 | | - |
13 | | -## 🚀 Quick Start |
14 | | - |
15 | | -### Prerequisites |
16 | | - |
17 | | -- Node.js 22+ |
18 | | -- pnpm 10+ |
19 | | -- Docker & Docker Compose |
20 | | -- VS Code 1.85+ |
21 | | - |
22 | | -### 5-Minute Setup |
23 | | - |
24 | | -```bash |
25 | | -# 1. Clone the repository |
| 7 | +``` |
26 | 8 | git clone https://github.com/devradar/devradar.git |
27 | 9 | cd devradar |
28 | | - |
29 | | -# 2. Install dependencies |
30 | 10 | pnpm install |
31 | | - |
32 | | -# 3. Start infrastructure (Redis + PostgreSQL) |
33 | 11 | docker-compose up -d |
34 | | - |
35 | | -# 4. Set up environment |
36 | | -cp .env.example .env |
37 | | -# Edit .env with your GitHub OAuth credentials |
38 | | - |
39 | | -# 5. Run database migrations |
40 | | -pnpm db:migrate |
41 | | - |
42 | | -# 6. Start development servers |
| 12 | +cp apps/server/.env.example apps/server/.env |
| 13 | +pnpm --filter @devradar/server db:migrate |
43 | 14 | pnpm dev |
44 | 15 | ``` |
45 | 16 |
|
46 | | -### Verify Setup |
47 | | - |
48 | | -```bash |
49 | | -# Check all services are running |
50 | | -pnpm health-check |
| 17 | +## structure |
51 | 18 |
|
52 | | -# Run tests |
53 | | -pnpm test |
54 | | - |
55 | | -# Open VS Code extension in development mode |
56 | | -pnpm dev:extension |
57 | 19 | ``` |
58 | | - |
59 | | ---- |
60 | | - |
61 | | -## 🏗️ Architecture |
62 | | - |
63 | | -```text |
64 | | -┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ |
65 | | -│ VS Code │────▶│ WebSocket │────▶│ Redis │ |
66 | | -│ Extension │◀────│ Server │◀────│ (Pub/Sub) │ |
67 | | -└─────────────────┘ └─────────────────┘ └─────────────────┘ |
68 | | - │ │ |
69 | | - │ │ |
70 | | - ▼ ▼ |
71 | | - ┌─────────────────┐ ┌─────────────────┐ |
72 | | - │ REST API │────▶│ PostgreSQL │ |
73 | | - │ (Fastify) │◀────│ (Users/Data) │ |
74 | | - └─────────────────┘ └─────────────────┘ |
75 | | -``` |
76 | | - |
77 | | -### Tech Stack |
78 | | - |
79 | | -| Layer | Technology | Purpose | |
80 | | -| ------------ | ------------------------ | ------------------------------- | |
81 | | -| Extension | TypeScript + VS Code API | Client presence tracking | |
82 | | -| Backend | Node.js + Fastify | REST API + WebSocket server | |
83 | | -| Real-time | WebSocket (ws) | Persistent presence connections | |
84 | | -| Hot Storage | Redis | Ephemeral presence state (TTL) | |
85 | | -| Cold Storage | PostgreSQL + Prisma | Users, relationships, history | |
86 | | -| Infra | Docker + Kubernetes | Container orchestration | |
87 | | - |
88 | | ---- |
89 | | - |
90 | | -## 📁 Project Structure |
91 | | - |
92 | | -```text |
93 | 20 | devradar/ |
94 | 21 | ├── apps/ |
95 | | -│ ├── api/ # Fastify REST API |
96 | | -│ ├── ws/ # WebSocket server |
97 | | -│ ├── web/ # Landing page (Next.js) |
98 | | -│ └── extension/ # VS Code extension |
| 22 | +│ ├── extension/ # vs code extension |
| 23 | +│ ├── server/ # fastify rest api + websocket server |
| 24 | +│ └── web/ # next.js landing page + dashboard |
99 | 25 | ├── packages/ |
100 | | -│ ├── core/ # Shared types, DTOs, validators |
101 | | -│ ├── ui/ # Shared React components |
102 | | -│ ├── database/ # Prisma schema & client |
103 | | -│ └── tsconfig/ # Shared TypeScript config |
104 | | -├── rules/ # Engineering guidelines |
105 | | -│ ├── 00_INDEX.md # Documentation index |
106 | | -│ └── ... # Standards & policies |
107 | | -├── docs/ |
108 | | -│ └── adr/ # Architecture Decision Records |
109 | | -├── ops/ |
110 | | -│ └── runbooks/ # Operational runbooks |
111 | | -└── tools/ # Scripts & utilities |
| 26 | +│ ├── shared/ # shared types, validators, constants |
| 27 | +│ ├── eslint-config/ # eslint configurations |
| 28 | +│ └── tsconfig/ # typescript configuration presets |
| 29 | +└── docker-compose.yml # postgresql + redis |
112 | 30 | ``` |
113 | 31 |
|
114 | | ---- |
115 | | - |
116 | | -## 🔧 Development |
117 | | - |
118 | | -### Available Commands |
| 32 | +## tech stack |
119 | 33 |
|
120 | | -```bash |
121 | | -# Development |
122 | | -pnpm dev # Start all services in dev mode |
123 | | -pnpm dev:api # Start API server only |
124 | | -pnpm dev:ws # Start WebSocket server only |
125 | | -pnpm dev:extension # Launch extension in VS Code debug mode |
| 34 | +| layer | technology | |
| 35 | +| ---------- | --------------------- | |
| 36 | +| runtime | node.js 22+ | |
| 37 | +| monorepo | pnpm + turbo | |
| 38 | +| backend | fastify + websocket | |
| 39 | +| database | postgresql + prisma | |
| 40 | +| cache | redis + ioredis | |
| 41 | +| frontend | next.js 16 + react 19 | |
| 42 | +| styling | tailwind css v4 | |
| 43 | +| validation | zod | |
126 | 44 |
|
127 | | -# Testing |
128 | | -pnpm test # Run all tests |
129 | | -pnpm test:unit # Unit tests only |
130 | | -pnpm test:e2e # End-to-end tests |
131 | | -pnpm test:coverage # Generate coverage report |
| 45 | +## commands |
132 | 46 |
|
133 | | -# Code Quality |
134 | | -pnpm lint # Run ESLint |
135 | | -pnpm format # Run Prettier |
136 | | -pnpm typecheck # TypeScript type checking |
137 | | - |
138 | | -# Database |
139 | | -pnpm db:migrate # Run migrations |
140 | | -pnpm db:seed # Seed development data |
141 | | -pnpm db:studio # Open Prisma Studio |
142 | | - |
143 | | -# Build |
144 | | -pnpm build # Build all packages |
145 | | -pnpm build:extension # Build VS Code extension (.vsix) |
| 47 | +``` |
| 48 | +pnpm dev # start all services |
| 49 | +pnpm dev:server # start api/websocket server only |
| 50 | +pnpm dev:extension # launch extension in vs code debug mode |
| 51 | +pnpm dev:web # start web app only |
| 52 | +pnpm build # build all packages |
| 53 | +pnpm test # run tests |
| 54 | +pnpm lint # lint code |
| 55 | +pnpm format # format code |
146 | 56 | ``` |
147 | 57 |
|
148 | | -### Environment Variables |
149 | | - |
150 | | -Copy `.env.example` to `.env` and configure: |
151 | | - |
152 | | -```env |
153 | | -# Required |
154 | | -DATABASE_URL="postgresql://user:pass@localhost:5432/devradar" |
155 | | -REDIS_URL="redis://localhost:6379" |
156 | | -GITHUB_CLIENT_ID="your_github_oauth_client_id" |
157 | | -GITHUB_CLIENT_SECRET="your_github_oauth_client_secret" |
| 58 | +## server commands |
158 | 59 |
|
159 | | -# Optional |
160 | | -LOG_LEVEL="debug" |
161 | | -JWT_SECRET="randomly-generated-secret" |
| 60 | +``` |
| 61 | +pnpm --filter @devradar/server dev # dev mode with hot reload |
| 62 | +pnpm --filter @devradar/server build # build for production |
| 63 | +pnpm --filter @devradar/server start # start production server |
| 64 | +pnpm --filter @devradar/server db:migrate # run database migrations |
| 65 | +pnpm --filter @devradar/server db:studio # open prisma studio |
162 | 66 | ``` |
163 | 67 |
|
164 | | -See [.env.example](./.env.example) for all available options. |
| 68 | +## extension commands |
165 | 69 |
|
166 | | ---- |
| 70 | +``` |
| 71 | +pnpm --filter devradar dev # watch mode for development |
| 72 | +pnpm --filter devradar build # build extension |
| 73 | +pnpm --filter devradar package # create vsix package |
| 74 | +``` |
167 | 75 |
|
168 | | -## 📜 License |
| 76 | +## license |
169 | 77 |
|
170 | | -This project is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** - see the [LICENSE](./LICENSE) file for details. |
| 78 | +agpl-3.0 |
0 commit comments