Skip to content

Commit bb7f24b

Browse files
🔧 chore(dev): implement Phase 0.4 Local Development Environment (#6)
1 parent 5961431 commit bb7f24b

16 files changed

Lines changed: 3151 additions & 16 deletions

.vscode/api-tests.http

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
###############################################################################
2+
# Luminous API Test Requests
3+
###############################################################################
4+
# Use with the REST Client VS Code extension (humao.rest-client)
5+
#
6+
# Usage:
7+
# 1. Start the API (F5 or run "API: Debug" task)
8+
# 2. Click "Send Request" above any request
9+
# 3. View response in the split panel
10+
#
11+
# Environment variables are defined in .vscode/settings.json
12+
###############################################################################
13+
14+
@baseUrl = http://localhost:5000
15+
@contentType = application/json
16+
17+
###############################################################################
18+
# Health & Status
19+
###############################################################################
20+
21+
### Health Check
22+
GET {{baseUrl}}/health
23+
24+
### Check Dev Auth Status
25+
GET {{baseUrl}}/api/devauth/status
26+
27+
###############################################################################
28+
# Development Authentication
29+
###############################################################################
30+
31+
### Get Default Dev Token
32+
# @name getToken
33+
POST {{baseUrl}}/api/devauth/token
34+
35+
### Store token from response
36+
@token = {{getToken.response.body.accessToken}}
37+
38+
### Get Custom Dev Token (Owner role)
39+
POST {{baseUrl}}/api/devauth/token/custom
40+
Content-Type: {{contentType}}
41+
42+
{
43+
"userId": "test-user-001",
44+
"familyId": "test-family-001",
45+
"email": "owner@luminous.local",
46+
"role": "Owner",
47+
"displayName": "Test Owner"
48+
}
49+
50+
### Get Custom Dev Token (Child role)
51+
POST {{baseUrl}}/api/devauth/token/custom
52+
Content-Type: {{contentType}}
53+
54+
{
55+
"userId": "child-user-001",
56+
"familyId": "test-family-001",
57+
"email": "child@luminous.local",
58+
"role": "Child",
59+
"displayName": "Test Child"
60+
}
61+
62+
### Get Custom Dev Token (Caregiver role)
63+
POST {{baseUrl}}/api/devauth/token/custom
64+
Content-Type: {{contentType}}
65+
66+
{
67+
"userId": "caregiver-001",
68+
"familyId": "test-family-001",
69+
"email": "nanny@example.com",
70+
"role": "Caregiver",
71+
"displayName": "Test Caregiver"
72+
}
73+
74+
###############################################################################
75+
# Family API (requires authentication)
76+
###############################################################################
77+
78+
### Get Family Details
79+
GET {{baseUrl}}/api/families
80+
Authorization: Bearer {{token}}
81+
82+
### Create Family
83+
POST {{baseUrl}}/api/families
84+
Content-Type: {{contentType}}
85+
Authorization: Bearer {{token}}
86+
87+
{
88+
"name": "Smith Family",
89+
"timezone": "America/New_York"
90+
}
91+
92+
###############################################################################
93+
# User API (requires authentication)
94+
###############################################################################
95+
96+
### Get Family Members
97+
GET {{baseUrl}}/api/users
98+
Authorization: Bearer {{token}}
99+
100+
### Get Current User Profile
101+
GET {{baseUrl}}/api/users/me
102+
Authorization: Bearer {{token}}
103+
104+
###############################################################################
105+
# Events API (requires authentication)
106+
###############################################################################
107+
108+
### Get Events
109+
GET {{baseUrl}}/api/events
110+
Authorization: Bearer {{token}}
111+
112+
### Get Events for Date Range
113+
GET {{baseUrl}}/api/events?startDate=2025-01-01&endDate=2025-01-31
114+
Authorization: Bearer {{token}}
115+
116+
###############################################################################
117+
# Chores API (requires authentication)
118+
###############################################################################
119+
120+
### Get Chores
121+
GET {{baseUrl}}/api/chores
122+
Authorization: Bearer {{token}}
123+
124+
###############################################################################
125+
# Devices API (requires authentication)
126+
###############################################################################
127+
128+
### Generate Device Link Code
129+
POST {{baseUrl}}/api/devices/link-code
130+
Authorization: Bearer {{token}}
131+
132+
### Get Linked Devices
133+
GET {{baseUrl}}/api/devices
134+
Authorization: Bearer {{token}}
135+
136+
###############################################################################
137+
# Swagger / OpenAPI
138+
###############################################################################
139+
140+
### Get OpenAPI Spec
141+
GET {{baseUrl}}/swagger/v1/swagger.json

.vscode/extensions.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"recommendations": [
3+
// ==========================================================================
4+
// C# / .NET Development
5+
// ==========================================================================
6+
"ms-dotnettools.csdevkit",
7+
"ms-dotnettools.csharp",
8+
"ms-dotnettools.vscode-dotnet-runtime",
9+
10+
// ==========================================================================
11+
// Angular / TypeScript Development
12+
// ==========================================================================
13+
"angular.ng-template",
14+
"dbaeumer.vscode-eslint",
15+
"esbenp.prettier-vscode",
16+
17+
// ==========================================================================
18+
// Tailwind CSS
19+
// ==========================================================================
20+
"bradlc.vscode-tailwindcss",
21+
22+
// ==========================================================================
23+
// Docker
24+
// ==========================================================================
25+
"ms-azuretools.vscode-docker",
26+
27+
// ==========================================================================
28+
// Azure / Bicep
29+
// ==========================================================================
30+
"ms-azuretools.vscode-bicep",
31+
"ms-vscode.azure-account",
32+
"ms-azuretools.vscode-azurefunctions",
33+
34+
// ==========================================================================
35+
// API Development
36+
// ==========================================================================
37+
"humao.rest-client",
38+
"42crunch.vscode-openapi",
39+
40+
// ==========================================================================
41+
// Git
42+
// ==========================================================================
43+
"eamodio.gitlens",
44+
"mhutchie.git-graph",
45+
46+
// ==========================================================================
47+
// Productivity
48+
// ==========================================================================
49+
"christian-kohler.path-intellisense",
50+
"streetsidesoftware.code-spell-checker",
51+
"usernamehw.errorlens",
52+
"gruntfuggly.todo-tree",
53+
54+
// ==========================================================================
55+
// Markdown / Documentation
56+
// ==========================================================================
57+
"yzhang.markdown-all-in-one",
58+
"bierner.markdown-mermaid",
59+
60+
// ==========================================================================
61+
// Testing
62+
// ==========================================================================
63+
"ms-vscode.test-adapter-converter",
64+
"hbenl.vscode-test-explorer",
65+
66+
// ==========================================================================
67+
// Editor Enhancements
68+
// ==========================================================================
69+
"editorconfig.editorconfig",
70+
"aaron-bond.better-comments"
71+
],
72+
"unwantedRecommendations": []
73+
}

.vscode/launch.json

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
// ==========================================================================
5+
// .NET API Debugging
6+
// ==========================================================================
7+
{
8+
"name": "API: Debug",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "API: Build",
12+
"program": "${workspaceFolder}/src/Luminous.Api/bin/Debug/net10.0/Luminous.Api.dll",
13+
"args": [],
14+
"cwd": "${workspaceFolder}/src/Luminous.Api",
15+
"stopAtEntry": false,
16+
"env": {
17+
"ASPNETCORE_ENVIRONMENT": "Development",
18+
"ASPNETCORE_URLS": "http://localhost:5000"
19+
},
20+
"console": "integratedTerminal",
21+
"serverReadyAction": {
22+
"action": "openExternally",
23+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
24+
"uriFormat": "%s/swagger"
25+
}
26+
},
27+
{
28+
"name": "API: Debug (HTTPS)",
29+
"type": "coreclr",
30+
"request": "launch",
31+
"preLaunchTask": "API: Build",
32+
"program": "${workspaceFolder}/src/Luminous.Api/bin/Debug/net10.0/Luminous.Api.dll",
33+
"args": [],
34+
"cwd": "${workspaceFolder}/src/Luminous.Api",
35+
"stopAtEntry": false,
36+
"env": {
37+
"ASPNETCORE_ENVIRONMENT": "Development",
38+
"ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000"
39+
},
40+
"console": "integratedTerminal",
41+
"serverReadyAction": {
42+
"action": "openExternally",
43+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
44+
"uriFormat": "%s/swagger"
45+
}
46+
},
47+
{
48+
"name": "API: Attach to Process",
49+
"type": "coreclr",
50+
"request": "attach",
51+
"processId": "${command:pickProcess}"
52+
},
53+
54+
// ==========================================================================
55+
// .NET Tests Debugging
56+
// ==========================================================================
57+
{
58+
"name": "Tests: Debug Domain",
59+
"type": "coreclr",
60+
"request": "launch",
61+
"preLaunchTask": "Solution: Build All",
62+
"program": "dotnet",
63+
"args": [
64+
"test",
65+
"${workspaceFolder}/tests/Luminous.Domain.Tests/Luminous.Domain.Tests.csproj",
66+
"--no-build"
67+
],
68+
"cwd": "${workspaceFolder}",
69+
"console": "integratedTerminal",
70+
"stopAtEntry": false
71+
},
72+
{
73+
"name": "Tests: Debug Application",
74+
"type": "coreclr",
75+
"request": "launch",
76+
"preLaunchTask": "Solution: Build All",
77+
"program": "dotnet",
78+
"args": [
79+
"test",
80+
"${workspaceFolder}/tests/Luminous.Application.Tests/Luminous.Application.Tests.csproj",
81+
"--no-build"
82+
],
83+
"cwd": "${workspaceFolder}",
84+
"console": "integratedTerminal",
85+
"stopAtEntry": false
86+
},
87+
{
88+
"name": "Tests: Debug API",
89+
"type": "coreclr",
90+
"request": "launch",
91+
"preLaunchTask": "Solution: Build All",
92+
"program": "dotnet",
93+
"args": [
94+
"test",
95+
"${workspaceFolder}/tests/Luminous.Api.Tests/Luminous.Api.Tests.csproj",
96+
"--no-build"
97+
],
98+
"cwd": "${workspaceFolder}",
99+
"console": "integratedTerminal",
100+
"stopAtEntry": false
101+
},
102+
{
103+
"name": "Tests: Debug All",
104+
"type": "coreclr",
105+
"request": "launch",
106+
"preLaunchTask": "Solution: Build All",
107+
"program": "dotnet",
108+
"args": ["test", "--no-build"],
109+
"cwd": "${workspaceFolder}",
110+
"console": "integratedTerminal",
111+
"stopAtEntry": false
112+
},
113+
114+
// ==========================================================================
115+
// Angular Web App Debugging
116+
// ==========================================================================
117+
{
118+
"name": "Web: Debug in Chrome",
119+
"type": "chrome",
120+
"request": "launch",
121+
"preLaunchTask": "Web: Start Dev Server",
122+
"url": "http://localhost:4200",
123+
"webRoot": "${workspaceFolder}/clients/web/src",
124+
"sourceMapPathOverrides": {
125+
"webpack:/*": "${webRoot}/*"
126+
}
127+
},
128+
{
129+
"name": "Web: Debug in Edge",
130+
"type": "msedge",
131+
"request": "launch",
132+
"preLaunchTask": "Web: Start Dev Server",
133+
"url": "http://localhost:4200",
134+
"webRoot": "${workspaceFolder}/clients/web/src",
135+
"sourceMapPathOverrides": {
136+
"webpack:/*": "${webRoot}/*"
137+
}
138+
},
139+
{
140+
"name": "Web: Attach to Chrome",
141+
"type": "chrome",
142+
"request": "attach",
143+
"port": 9222,
144+
"webRoot": "${workspaceFolder}/clients/web/src"
145+
}
146+
],
147+
"compounds": [
148+
// ==========================================================================
149+
// Full Stack Debugging
150+
// ==========================================================================
151+
{
152+
"name": "Full Stack: API + Web (Chrome)",
153+
"configurations": ["API: Debug", "Web: Debug in Chrome"],
154+
"stopAll": true,
155+
"presentation": {
156+
"hidden": false,
157+
"group": "Full Stack",
158+
"order": 1
159+
}
160+
},
161+
{
162+
"name": "Full Stack: API + Web (Edge)",
163+
"configurations": ["API: Debug", "Web: Debug in Edge"],
164+
"stopAll": true,
165+
"presentation": {
166+
"hidden": false,
167+
"group": "Full Stack",
168+
"order": 2
169+
}
170+
}
171+
]
172+
}

0 commit comments

Comments
 (0)