From 17a56460aad98ddb6fdaf46d5253a549483a6c92 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Sep 2025 06:44:20 +0000 Subject: [PATCH 1/3] Initial plan From 8bc130549a02da262a3b58a8fd450ed1acb7dc79 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Sep 2025 06:50:45 +0000 Subject: [PATCH 2/3] Add 5 new Laravel 12 shortcuts to laravel-framework.json Co-authored-by: tarikmanoar <17971022+tarikmanoar@users.noreply.github.com> --- data/laravel-framework.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/data/laravel-framework.json b/data/laravel-framework.json index 3b95b220d..b815fc2db 100644 --- a/data/laravel-framework.json +++ b/data/laravel-framework.json @@ -1158,6 +1158,26 @@ { "definition": "Reverb ওয়েবসকেট সার্ভার", "code": "php artisan reverb:start" + }, + { + "definition": "Laravel Pulse ইনস্টল করতে (পারফরমেন্স মনিটরিং)", + "code": "composer require laravel/pulse && php artisan pulse:install" + }, + { + "definition": "Laravel Herd দিয়ে লোকাল ডেভেলপমেন্ট এনভায়রনমেন্ট শুরু করতে", + "code": "herd start && herd link" + }, + { + "definition": "Laravel Prompts দিয়ে ইন্টারঅ্যাক্টিভ কমান্ড তৈরি করতে", + "code": "use function Laravel\\Prompts\\{text, select, confirm};\n\n$name = text('What is your name?');\n$role = select('What is your role?', ['admin', 'user']);\n$confirmed = confirm('Do you wish to continue?');" + }, + { + "definition": "উন্নত কিউ মনিটরিং এবং ফেইল হওয়া জব পুনরায় চালু করতে", + "code": "php artisan queue:monitor && php artisan queue:retry all" + }, + { + "definition": "মডেল ফ্যাক্টরি স্টেট এবং সিকোয়েন্স ব্যবহার করতে (Laravel 12)", + "code": "User::factory()->state(['role' => 'admin'])->sequence(\n ['name' => 'John'],\n ['name' => 'Jane']\n)->count(2)->create();" } ] } From 557d67f5d9fe205a83405d5c6b4dd007cd55814a Mon Sep 17 00:00:00 2001 From: tarikmanoar Date: Mon, 29 Sep 2025 12:55:45 +0600 Subject: [PATCH 3/3] Add initial copilot instructions and mcp configuration file --- .github/copilot-instructions.md | 87 +++++++++++++++++++++++++++++++++ .vscode/mcp.json | 3 ++ 2 files changed, 90 insertions(+) create mode 100644 .github/copilot-instructions.md create mode 100644 .vscode/mcp.json diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..c92fe9c34 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,87 @@ +# DevSonket - Bengali Developer Cheatsheet Repository + +## Project Overview +DevSonket is a Gatsby-based static site that generates a comprehensive Bengali developer cheatsheet collection. The architecture centers around JSON-driven content management where individual technology cheatsheets are stored as structured JSON files in the `data/` directory. + +## Core Architecture + +### Data-Driven Content System +- **Primary Data Source**: `data/*.json` files contain cheatsheet content +- **Three Supported Formats**: + - `codendesc`: Items with both `code` and `definition` properties + - `onlycode`: Items with only `code` property + - `mix`: Sections can mix both formats within same cheatsheet +- **Demo Files**: Reference `data/demo/` for format examples before creating new cheatsheets + +### JSON Structure Pattern +```json +{ + "id": "unique-identifier", + "title": "বাংলা Title", + "slug": "url-slug", + "description": "Brief description", + "colorPref": "#hexcolor", + "contents": [ + { + "title": "Section Title", + "items": [ + {"definition": "Description", "code": "command"} // or just {"code": "command"} + ] + } + ] +} +``` + +### Build Process Integration +- **Thumbnail Generation**: `npm run thumbnail` uses Puppeteer to generate social media images +- **GitHub API Integration**: `gatsby-node.js` fetches contributor data for each cheatsheet via GitHub API +- **Static Site Generation**: Gatsby creates individual pages at `/{data.id}/` and print pages at `/print/{data.id}/` + +## Development Workflows + +### Adding New Cheatsheets +1. **Direct JSON**: Create properly formatted JSON in `data/` directory +2. **Draft Workflow**: Add rough content to `data/draft/` for later JSON conversion +3. **Required Properties**: Ensure unique `id`, meaningful `title`, and proper `colorPref` +4. **Validation**: Check against demo files in `data/demo/` + +### Key Commands +- `npm run develop` - Development server with hot reload +- `npm run build` - Production build with thumbnail generation +- `npm run thumbnail` - Generate social media thumbnails only +- `postbuild.js` - Copies build files to static deployment structure + +### File Naming Conventions +- JSON files use kebab-case matching the `id` field +- Avoid spaces or special characters in filenames +- Keep filenames descriptive but concise + +## Project-Specific Patterns + +### Contributor Attribution +The `contributorMap.js` script processes GitHub commit history to attribute contributions. Each cheatsheet page displays contributor avatars based on commits to that specific JSON file. + +### Color Management +- Each cheatsheet defines `colorPref` for theming +- `isItDark()` utility determines text contrast automatically +- Colors influence page headers and print layouts + +### Bilingual Support Structure +Content primarily in Bengali with English fallbacks. README files demonstrate the bilingual documentation pattern used throughout. + +## Critical Dependencies +- **Gatsby**: Static site generation and GraphQL data layer +- **Puppeteer**: Automated thumbnail generation for social sharing +- **Axios**: GitHub API integration for contributor data +- **React**: Component-based UI with emotion styling + +## Integration Points +- **GitHub API**: Real-time contributor data (requires `GATSBY_GITHUB_TOKEN`) +- **Static Hosting**: Files copied to `static/` directory for deployment +- **Social Media**: Generated thumbnails enable rich link previews + +## Quality Standards +- Maintain JSON format consistency across all cheatsheets +- Include Bengali descriptions for accessibility +- Test thumbnail generation after adding new content +- Verify unique IDs to prevent routing conflicts diff --git a/.vscode/mcp.json b/.vscode/mcp.json new file mode 100644 index 000000000..cef6b841e --- /dev/null +++ b/.vscode/mcp.json @@ -0,0 +1,3 @@ +{ + "servers": {} +} \ No newline at end of file