Skip to content

Commit 9d074e1

Browse files
authored
Merge pull request #103 from bfritscher/copilot/fix-102
Add comprehensive GitHub Copilot instructions for development workflow
2 parents c892d56 + e6f37a3 commit 9d074e1

File tree

3 files changed

+294
-161
lines changed

3 files changed

+294
-161
lines changed

.github/copilot-instructions.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Typesense Dashboard
2+
3+
Typesense Dashboard is a Vue 3 + Quasar Framework + TypeScript web application for managing and browsing Typesense collections. It can be built as both a web application and desktop application using Electron.
4+
5+
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
6+
7+
## Working Effectively
8+
9+
- **Install dependencies:**
10+
- `npm install` -- takes 31 seconds. NEVER CANCEL. Set timeout to 60+ minutes.
11+
- **Build the web application:**
12+
- `npm run build` -- takes 23 seconds. NEVER CANCEL. Set timeout to 60+ minutes.
13+
- **Build the desktop application:**
14+
- `npm run build:desktop` -- takes 58 seconds. NEVER CANCEL. Set timeout to 90+ minutes.
15+
- Creates packages for Linux, macOS, and Windows in `dist/electron/Packaged/`
16+
- **Run development server:**
17+
- Web: `npm run dev` -- starts on port 9000
18+
- Desktop: `npm run dev:desktop` -- fails in sandboxed environments due to Electron security requirements (this is expected)
19+
- **Lint and format code:**
20+
- `npm run lint` -- takes 8 seconds. NEVER CANCEL. Set timeout to 30+ minutes.
21+
- `npm run format` -- takes 2 seconds. NEVER CANCEL. Set timeout to 30+ minutes.
22+
- **Test the application:**
23+
- `npm run test` -- no actual tests exist, just echoes "No test specified"
24+
25+
## Validation
26+
27+
- **ALWAYS** run `npm run lint` and `npm run format` before committing changes or the CI (.github/workflows/build_deploy.yml) will fail.
28+
- **ALWAYS** manually validate web application changes by:
29+
1. Building with `npm run build`
30+
2. Serving the built application from `dist/spa/` (e.g., with `python3 -m http.server 8080`)
31+
3. Testing that the application loads at http://localhost:8080 and shows the login form
32+
4. Verifying the page title shows "Typesense-Dashboard"
33+
- **VALIDATION SCENARIOS**: When making changes to the dashboard:
34+
1. Test the application loads correctly and shows the login form with fields for Host, Port, Protocol, Path, and API Key
35+
2. Verify the navigation menu structure is intact (if making navigation changes)
36+
3. Test any specific functionality you modified
37+
- You can build and run both web and desktop versions of the application
38+
- Desktop development mode (`npm run dev:desktop`) will fail in sandboxed environments - this is expected and documented limitation
39+
- Docker builds may fail in network-restricted environments - this is a limitation of the testing environment, not the code
40+
- The built application should be accessible via HTTP server and display the correct login interface
41+
42+
## Common Tasks
43+
44+
The following are outputs from frequently run commands. Reference them instead of viewing, searching, or running bash commands to save time.
45+
46+
### Repository Root
47+
```
48+
ls -la
49+
.dockerignore
50+
.editorconfig
51+
.git
52+
.github
53+
.gitignore
54+
.prettierrc.json
55+
.quasar/
56+
.vscode/
57+
Dockerfile
58+
LICENSE.txt
59+
README.md
60+
config.json.autologin
61+
config.json.sample
62+
dist/ (created after build)
63+
docs/
64+
eslint.config.js
65+
index.html
66+
node_modules/ (created after npm install)
67+
package-lock.json
68+
package.json
69+
postcss.config.js
70+
public/
71+
quasar.config.ts
72+
src/
73+
src-electron/
74+
tsconfig.json
75+
typesense-test-server/
76+
```
77+
78+
### Package.json Scripts
79+
```
80+
"scripts": {
81+
"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"",
82+
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
83+
"test": "echo \"No test specified\" && exit 0",
84+
"dev": "quasar dev",
85+
"dev:desktop": "quasar dev -m electron --devtools",
86+
"build": "quasar build",
87+
"build:desktop": "quasar build -m electron --target all",
88+
"postinstall": "quasar prepare"
89+
}
90+
```
91+
92+
### Key Dependencies
93+
- Vue 3.5.17
94+
- Quasar Framework 2.18.1
95+
- TypeScript 5.8.3
96+
- Electron 37.2.0 (for desktop builds)
97+
- Typesense 2.0.3
98+
- Monaco Editor 0.52.2 (for code editing)
99+
100+
### Project Structure
101+
- `src/` - Main Vue application source code
102+
- `src/pages/` - Page components (Collections, Search, ApiKeys, etc.)
103+
- `src/components/` - Reusable components
104+
- `src/stores/` - Pinia stores for state management
105+
- `src/router/` - Vue Router configuration
106+
- `src/shared/` - Shared utilities and API client
107+
- `src-electron/` - Electron-specific code for desktop builds
108+
- `quasar.config.ts` - Quasar framework configuration
109+
- `eslint.config.js` - ESLint configuration
110+
- `.prettierrc.json` - Prettier formatting configuration
111+
- `config.json.sample` - Sample configuration for auto-login
112+
113+
### Build Outputs
114+
- Web build: `dist/spa/` - Static files ready for web deployment
115+
- Desktop build: `dist/electron/Packaged/` - Contains platform-specific executables:
116+
- `Typesense-Dashboard-linux-x64/`
117+
- `Typesense-Dashboard-darwin-x64/`
118+
- `Typesense-Dashboard-mas-x64/`
119+
- `Typesense-Dashboard-win32-x64/`
120+
121+
### Configuration
122+
- Development servers use port 9000 by default
123+
- The application can be configured with `config.json` for auto-login and UI customization
124+
- See `config.json.sample` for configuration options
125+
- Environment can be tested with local Typesense instances using `typesense-test-server/docker-compose.yml`
126+
- Provides multiple Typesense versions (v17.0 to v28.0) on different ports
127+
- Default API key is "dev"
128+
- Example: Typesense v28 runs on port 8128, v27 on 8127, etc.
129+
130+
### CI/CD Workflows
131+
- `.github/workflows/build_deploy.yml` - Builds and deploys to GitHub Pages
132+
- `.github/workflows/build_docker.yml` - Builds and publishes Docker images
133+
- `.github/workflows/release_tags.yml` - Handles release automation

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)