Adarshddata ameeq-ul-haq commited on
Commit
4f3c97e
·
0 Parent(s):

Duplicate from ameeq-ul-haq/WebDev-Dataset

Browse files

Co-authored-by: Ameeq Ul Haq <ameeq-ul-haq@users.noreply.huggingface.co>

Files changed (3) hide show
  1. .gitattributes +60 -0
  2. README.md +305 -0
  3. dataset.json +0 -0
.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - code
9
+ - web-development
10
+ - full-stack
11
+ - python
12
+ - flask
13
+ - fastapi
14
+ - sqlite
15
+ - html
16
+ - css
17
+ - javascript
18
+ - instruction-tuning
19
+ - llm-finetuning
20
+ pretty_name: Full-Stack WebDev Multi-File Dataset (100 Apps)
21
+ size_categories:
22
+ - n<1K
23
+ ---
24
+
25
+ # WebDev-Dataset: 100 Full-Stack Web Apps for LLM Fine-Tuning
26
+
27
+ A fine-tuning dataset of **100 complete, working, multi-file full-stack web applications**.
28
+
29
+ Each sample contains a full project — backend routes, database schema, HTML frontend, CSS styling, and JavaScript — all in a single training example. This teaches a model to generate a whole working project, not just isolated snippets.
30
+
31
+ ---
32
+
33
+ ## Dataset Overview
34
+
35
+ - **Total Samples:** 100 unique full-stack web applications
36
+ - **File:** `dataset.json` (~462 KB)
37
+ - **Format:** Alpaca JSON (`instruction` / `input` / `output`)
38
+ - **Code:** Every sample is fully runnable with no placeholders or skipped logic
39
+
40
+ ---
41
+
42
+ ## Format
43
+
44
+ ```json
45
+ [
46
+ {
47
+ "instruction": "Build a full-stack ... web app using Flask and SQLite ...",
48
+ "input": "",
49
+ "output": "<!-- FILE: database.py -->\n...\n<!-- FILE: app.py -->\n...\n<!-- FILE: templates/index.html -->\n...\n<!-- FILE: static/style.css -->\n...\n<!-- FILE: static/script.js -->\n..."
50
+ }
51
+ ]
52
+ ```
53
+
54
+ ### Fields
55
+
56
+ | Field | Type | Description |
57
+ | :--- | :--- | :--- |
58
+ | `instruction` | `string` | The prompt describing what app to build, the tech stack, and file structure |
59
+ | `input` | `string` | Always empty `""` |
60
+ | `output` | `string` | The complete multi-file source code |
61
+
62
+ ### File Delimiter
63
+
64
+ Files inside the `output` are separated by:
65
+
66
+ ```
67
+ <!-- FILE: path/to/file.ext -->
68
+ [source code]
69
+
70
+ <!-- FILE: path/to/another_file.ext -->
71
+ [source code]
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Tech Stack
77
+
78
+ Each app has 4-5 files:
79
+
80
+ ```
81
+ ├── database.py # SQLite connection and table setup
82
+ ├── app.py / main.py # Flask or FastAPI routes
83
+ ├── templates/
84
+ │ └── index.html # HTML frontend
85
+ └── static/
86
+ ├── style.css # CSS styling
87
+ └── script.js # JavaScript (Fetch API)
88
+ ```
89
+
90
+ - **Backend:** Python - Flask or FastAPI
91
+ - **Database:** SQLite3
92
+ - **Frontend:** HTML5, Vanilla CSS, Vanilla JavaScript (ES6+ async/await)
93
+
94
+ ---
95
+
96
+ ## App Catalog (100 Apps)
97
+
98
+ <details>
99
+ <summary><b>Batch 1: Productivity, Project Management & Habits (Apps 01-10)</b></summary>
100
+
101
+ 1. Inventory & Order Management *(Flask + SQLite)*
102
+ 2. Kanban Task Board *(FastAPI + SQLite)*
103
+ 3. Markdown Note Taker with Tags *(Flask + SQLite)*
104
+ 4. Personal Budget & Expense Tracker *(Flask + SQLite)*
105
+ 5. Recipe Box & Weekly Meal Planner *(FastAPI + SQLite)*
106
+ 6. Habit Tracker & Daily Streaks *(Flask + SQLite)*
107
+ 7. Mini CRM & Sales Pipeline *(FastAPI + SQLite)*
108
+ 8. Appointment & Booking Scheduler *(Flask + SQLite)*
109
+ 9. Help Desk & IT Support Tickets *(Flask + SQLite)*
110
+ 10. Community Polling & Voting *(FastAPI + SQLite)*
111
+ </details>
112
+
113
+ <details>
114
+ <summary><b>Batch 2: Education, Fitness & E-Commerce (Apps 11-20)</b></summary>
115
+
116
+ 11. Flashcard Study System *(Flask + SQLite)*
117
+ 12. Job Application Tracker *(Flask + SQLite)*
118
+ 13. URL Shortener & Click Analytics *(FastAPI + SQLite)*
119
+ 14. Fitness Workout Log & PR Tracker *(Flask + SQLite)*
120
+ 15. E-Commerce Product Catalog & Cart *(Flask + SQLite)*
121
+ 16. Community Discussion Forum *(Flask + SQLite)*
122
+ 17. Live Event Q&A Dashboard *(FastAPI + SQLite)*
123
+ 18. Digital Bookmark & Link Archiver *(Flask + SQLite)*
124
+ 19. Student Gradebook & GPA Calculator *(Flask + SQLite)*
125
+ 20. Project Time Tracking & Timesheets *(FastAPI + SQLite)*
126
+ </details>
127
+
128
+ <details>
129
+ <summary><b>Batch 3: Real Estate, Media & Dev Tools (Apps 21-30)</b></summary>
130
+
131
+ 21. Real Estate Property Listings *(Flask + SQLite)*
132
+ 22. Library Book Checkout System *(Flask + SQLite)*
133
+ 23. Simple Blog with Comments *(Flask + SQLite)*
134
+ 24. Weather & Air Quality Station *(Flask + SQLite)*
135
+ 25. User Authentication & Session Portal *(Flask + SQLite)*
136
+ 26. Password Vault & Secret Stash *(FastAPI + SQLite)*
137
+ 27. Movie & Series Watchlist *(Flask + SQLite)*
138
+ 28. Employee Directory & Teams *(Flask + SQLite)*
139
+ 29. Cloud Asset & File Metadata Catalog *(FastAPI + SQLite)*
140
+ 30. Code Snippet Pastebin *(Flask + SQLite)*
141
+ </details>
142
+
143
+ <details>
144
+ <summary><b>Batch 4: Freelance, Dining & Community (Apps 31-40)</b></summary>
145
+
146
+ 31. Freelance Project Milestone & Invoice Tracker *(Flask + SQLite)*
147
+ 32. Restaurant Table Reservation & Menu *(FastAPI + SQLite)*
148
+ 33. Podcast Episode Tracker *(Flask + SQLite)*
149
+ 34. Vehicle Maintenance & Fuel Mileage Log *(Flask + SQLite)*
150
+ 35. Daily Journal & Mood Tracker *(Flask + SQLite)*
151
+ 36. SaaS Feature Request & Upvote Board *(FastAPI + SQLite)*
152
+ 37. Classroom Quiz Maker & Tester *(Flask + SQLite)*
153
+ 38. Hotel Room Reservation Engine *(Flask + SQLite)*
154
+ 39. Donation & Fundraising Campaign Tracker *(FastAPI + SQLite)*
155
+ 40. Pet Adoption & Shelter Registry *(Flask + SQLite)*
156
+ </details>
157
+
158
+ <details>
159
+ <summary><b>Batch 5: Health, Commerce & Utilities (Apps 41-50)</b></summary>
160
+
161
+ 41. Vinyl & Music Collection Curator *(Flask + SQLite)*
162
+ 42. Pharmacy Prescription Reminder *(FastAPI + SQLite)*
163
+ 43. Conference Agenda & Speaker Schedule *(Flask + SQLite)*
164
+ 44. Newsletter Subscription & Audience Manager *(Flask + SQLite)*
165
+ 45. Warehouse Shipment & Logistics Tracking *(FastAPI + SQLite)*
166
+ 46. Smart Home Appliance Controller *(Flask + SQLite)*
167
+ 47. Travel Itinerary Planner & Packing Checklist *(Flask + SQLite)*
168
+ 48. Customer Feedback & NPS Survey *(FastAPI + SQLite)*
169
+ 49. Digital Contact & Business Card Rolodex *(Flask + SQLite)*
170
+ 50. Online Timed Auction & Bidding System *(FastAPI + SQLite)*
171
+ </details>
172
+
173
+ <details>
174
+ <summary><b>Batch 6: Memberships, Events & Dev Platforms (Apps 51-60)</b></summary>
175
+
176
+ 51. Gym Membership & Member Check-in Tracker *(Flask + SQLite)*
177
+ 52. Event Ticketing & RSVP Guest Manager *(FastAPI + SQLite)*
178
+ 53. Bug Bounty & Vulnerability Disclosure Log *(Flask + SQLite)*
179
+ 54. API Key & Webhook Developer Token Manager *(FastAPI + SQLite)*
180
+ 55. Freelance Gig & Services Marketplace Catalog *(Flask + SQLite)*
181
+ 56. Online Book Club & Reading Goal Shelf *(Flask + SQLite)*
182
+ 57. Community Equipment Rental & Tool Library *(FastAPI + SQLite)*
183
+ 58. Medical Clinic Patient Triage & Intake Portal *(Flask + SQLite)*
184
+ 59. Crypto Asset Portfolio & Watchlist Tracker *(FastAPI + SQLite)*
185
+ 60. Artisanal Coffee Shop Barista Order Queue *(Flask + SQLite)*
186
+ </details>
187
+
188
+ <details>
189
+ <summary><b>Batch 7: Operations, Culture & Environment (Apps 61-70)</b></summary>
190
+
191
+ 61. SaaS Software License & Renewal Spend Tracker *(FastAPI + SQLite)*
192
+ 62. Art Gallery Exhibition & Contemporary Showcase *(Flask + SQLite)*
193
+ 63. Employee Shift & Weekly Roster Scheduler *(FastAPI + SQLite)*
194
+ 64. E-Commerce RMA Product Returns Desk *(Flask + SQLite)*
195
+ 65. Podcast Sponsorship & Audio Ad Campaign Pipeline *(Flask + SQLite)*
196
+ 66. Language Learning Vocabulary Builder & Flash Quiz *(FastAPI + SQLite)*
197
+ 67. Indoor Plant & Garden Care Watering Log *(Flask + SQLite)*
198
+ 68. Infrastructure Ping & Health Monitor *(FastAPI + SQLite)*
199
+ 69. Car Rental Fleet & Reservation Engine *(Flask + SQLite)*
200
+ 70. Crowdfunding Backer & Tiered Campaign Tracker *(Flask + SQLite)*
201
+ </details>
202
+
203
+ <details>
204
+ <summary><b>Batch 8: Community, Property & Hobbies (Apps 71-80)</b></summary>
205
+
206
+ 71. Alumni Network Directory & Mentorship Hub *(Flask + SQLite)*
207
+ 72. Home Renovation & Contractor Expense Log *(FastAPI + SQLite)*
208
+ 73. Community Food Pantry & Donation Inventory *(Flask + SQLite)*
209
+ 74. Scientific Paper Reference & Citation Library *(Flask + SQLite)*
210
+ 75. Conference Booth Badge Scanner & Lead Capture *(FastAPI + SQLite)*
211
+ 76. Apartment Tenant Repair Maintenance Request Portal *(Flask + SQLite)*
212
+ 77. Video Game Backlog & Achievement QuestLog *(Flask + SQLite)*
213
+ 78. Dog Daycare & Pet Boarding Reservation *(FastAPI + SQLite)*
214
+ 79. Recipe Macro & Nutritional Calorie Calculator *(Flask + SQLite)*
215
+ 80. Micro-SaaS Product Launch Waitlist & Referral Leaderboard *(FastAPI + SQLite)*
216
+ </details>
217
+
218
+ <details>
219
+ <summary><b>Batch 9: Logistics, Entertainment & Workflows (Apps 81-90)</b></summary>
220
+
221
+ 81. Music Festival Stage Lineup & Timetable Scheduler *(Flask + SQLite)*
222
+ 82. Warehouse Handheld SKU & Bin Location Locator *(FastAPI + SQLite)*
223
+ 83. Academic Course Syllabus & Homework Submission Portal *(Flask + SQLite)*
224
+ 84. Monthly Gourmet Subscription Box Preference Picker *(Flask + SQLite)*
225
+ 85. Veterinary Clinic Vaccine Record & Booster Log *(FastAPI + SQLite)*
226
+ 86. Coworking Space Hot-Desk Floorplan Booking *(Flask + SQLite)*
227
+ 87. Professional Photography Session Inquiry & Portfolio *(Flask + SQLite)*
228
+ 88. Print-On-Demand Order Fulfillment Status Queue *(FastAPI + SQLite)*
229
+ 89. Local Neighborhood Lost & Found Bulletin Board *(Flask + SQLite)*
230
+ 90. Corporate Employee Expense Reimbursement Approval *(FastAPI + SQLite)*
231
+ </details>
232
+
233
+ <details>
234
+ <summary><b>Batch 10: Specialities, Tools & Status (Apps 91-100)</b></summary>
235
+
236
+ 91. Antique & Art Appraisal Valuation Request Desk *(Flask + SQLite)*
237
+ 92. Sports League Tournament Bracket & Match Scores *(FastAPI + SQLite)*
238
+ 93. Enterprise IT Asset Laptop & Peripheral Checkout *(Flask + SQLite)*
239
+ 94. Reserve Wine Cellar Inventory & Tasting Notes *(Flask + SQLite)*
240
+ 95. Public SaaS System Status Page & Incident Broadcast *(FastAPI + SQLite)*
241
+ 96. Banquet Catering Menu & Headcount Planner *(Flask + SQLite)*
242
+ 97. Bicycle Repair Shop Work Order Workbench *(FastAPI + SQLite)*
243
+ 98. Residential Solar Panel Generation & Savings Monitor *(Flask + SQLite)*
244
+ 99. DesignProof Client Mockup Review & Annotation *(FastAPI + SQLite)*
245
+ 100. Self-Hosted Read-Later Queue & Bookmarklet Saver *(Flask + SQLite)*
246
+ </details>
247
+
248
+ ---
249
+
250
+ ## Loading the Dataset
251
+
252
+ ```python
253
+ from datasets import load_dataset
254
+
255
+ dataset = load_dataset("json", data_files="dataset.json")
256
+ print(dataset["train"][0])
257
+ ```
258
+
259
+ ---
260
+
261
+ ## Fine-Tuning (Alpaca Format)
262
+
263
+ ```python
264
+ def format_prompt(example):
265
+ instructions = example["instruction"]
266
+ outputs = example["output"]
267
+ texts = []
268
+ for inst, out in zip(instructions, outputs):
269
+ text = f"### Instruction:\n{inst}\n\n### Response:\n{out}"
270
+ texts.append(text)
271
+ return {"text": texts}
272
+
273
+ formatted = dataset.map(format_prompt, batched=True)
274
+ ```
275
+
276
+ Works directly with **Unsloth**, **LLaMA-Factory**, and any Alpaca-compatible trainer.
277
+
278
+ ---
279
+
280
+ ## Extracting Generated Code to Files
281
+
282
+ ```python
283
+ import os, re, json
284
+
285
+ def extract_files(output_string, target_dir="./generated_app"):
286
+ pattern = r"<!-- FILE: (.*?) -->\n(.*?)(?=(?:<!-- FILE:|\Z))"
287
+ matches = re.findall(pattern, output_string, re.DOTALL)
288
+ for path, content in matches:
289
+ full_path = os.path.join(target_dir, path.strip())
290
+ os.makedirs(os.path.dirname(full_path), exist_ok=True)
291
+ with open(full_path, "w", encoding="utf-8") as f:
292
+ f.write(content.strip() + "\n")
293
+ print(f"Created: {full_path}")
294
+
295
+ with open("dataset.json", "r", encoding="utf-8") as f:
296
+ sample = json.load(f)[0]
297
+
298
+ extract_files(sample["output"], target_dir="./my_app")
299
+ ```
300
+
301
+ ---
302
+
303
+ ## License
304
+
305
+ MIT License - free to use, modify, and fine-tune on for any purpose.
dataset.json ADDED
The diff for this file is too large to render. See raw diff