-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsampleData.js
More file actions
2587 lines (2285 loc) · 112 KB
/
Copy pathsampleData.js
File metadata and controls
2587 lines (2285 loc) · 112 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
require('dotenv').config();
const mongoose = require('mongoose');
const readline = require('readline');
const fs = require('fs');
const path = require('path');
const User = require('./models/user');
const Destination = require('./models/destination');
const Experience = require('./models/experience');
const Photo = require('./models/photo');
const Plan = require('./models/plan');
const InviteCode = require('./models/inviteCode');
const Activity = require('./models/activity');
const Follow = require('./models/follow');
const Document = require('./models/document');
const backendLogger = require('./utilities/backend-logger');
/**
* Parse command line arguments
*/
function parseArgs() {
const args = process.argv.slice(2);
const parsed = {
clear: args.includes('--clear') || args.includes('-c'),
help: args.includes('--help') || args.includes('-h'),
production: args.includes('--production') || args.includes('-p'),
adminName: null,
adminEmail: null,
users: null,
destinations: null,
experiences: null,
plans: null,
photos: null,
invites: null,
activities: null,
follows: null,
documents: null
};
// Parse --admin-name flag
const nameIndex = args.findIndex(arg => arg === '--admin-name');
if (nameIndex !== -1 && args[nameIndex + 1]) {
parsed.adminName = args[nameIndex + 1];
}
// Parse --admin-email flag
const emailIndex = args.findIndex(arg => arg === '--admin-email');
if (emailIndex !== -1 && args[emailIndex + 1]) {
parsed.adminEmail = args[emailIndex + 1];
}
// Parse resource count flags
const parseNumberFlag = (flagName) => {
const index = args.findIndex(arg => arg === flagName);
if (index !== -1 && args[index + 1]) {
const num = parseInt(args[index + 1], 10);
return isNaN(num) ? null : num;
}
return null;
};
parsed.users = parseNumberFlag('--users');
parsed.destinations = parseNumberFlag('--destinations');
parsed.experiences = parseNumberFlag('--experiences');
parsed.plans = parseNumberFlag('--plans');
parsed.photos = parseNumberFlag('--photos');
parsed.invites = parseNumberFlag('--invites');
parsed.activities = parseNumberFlag('--activities');
parsed.follows = parseNumberFlag('--follows');
parsed.documents = parseNumberFlag('--documents');
return parsed;
}
/**
* Display help information
*/
function showHelp() {
backendLogger.info(`
Biensperience Sample Data Generator
Usage: node sampleData.js [options]
Options:
--clear, -c Clear all existing data before generating new sample data
--production, -p Production mode: only create super admin and archive user (no sample data)
--admin-name "Full Name" Set the super admin's full name
--admin-email "email@domain" Set the super admin's email address
--users <number> Number of regular users to create (default: 180)
--destinations <number> Number of destinations to create (default: 90)
--experiences <number> Number of experiences to create (default: 270)
--plans <number> Number of user plans to create (default: 450)
--photos <number> Number of photos to create (default: 600)
--invites <number> Number of invite codes to create (default: 60)
--activities <number> Number of activity log entries to create (default: 300)
--follows <number> Number of follow relationships to create (default: 400)
--documents <number> Number of documents to create (default: 50)
--help, -h Show this help message
Description:
Generates comprehensive sample data for Biensperience including:
- 1 super admin user (interactive or via flags) with API access and active session
- 1 demo user (demo@biensperience.com / demo123) for demo deployments
- 178 regular users with varied profiles (configurable with --users):
* 80% email verified, 20% unverified (email verification flow)
* 60% with active sessions (session tracking)
* 30% with invite codes (invite system)
* 10% with API access enabled (API token system)
* 70% public, 30% private profiles
- 90 destinations worldwide with structured travel tips (configurable with --destinations)
- 270 experiences with collaborators and plan items (configurable with --experiences)
- 450 user plans with advanced features (configurable with --plans):
* 30% have child plan items (nested sub-tasks)
* 50% have plan item notes from collaborators
* 40% have GeoJSON location data with addresses
* 60% have assigned plan items to specific users
* 40% have additional collaborators beyond the owner
* 70% have planned dates set
* 40% of plan items are marked complete
- 600 photos from Unsplash (configurable with --photos)
- 60 invite codes with various configurations (configurable with --invites)
- 300 activity log entries (last 30 days) with metadata (configurable with --activities)
- 400 follow relationships between users (configurable with --follows):
* Creates social graph with varied follow patterns
* Mix of active, pending, and blocked statuses
- 50 documents attached to plans with AI-parsed metadata (configurable with --documents)
If --admin-name and --admin-email are not provided, the script will prompt
you interactively for these details.
All output including super admin credentials is saved to sampleData.txt.
This file is automatically added to .gitignore for security.
Examples:
node sampleData.js
# Generate sample data with default counts (3x original)
node sampleData.js --production --admin-name "Admin" --admin-email "admin@example.com"
# Production mode: only create super admin and archive user (no sample data)
node sampleData.js --clear
# Clear database and generate fresh sample data
node sampleData.js --admin-name "John Doe" --admin-email "john@example.com"
# Generate with specific super admin credentials
node sampleData.js --users 50 --destinations 20 --experiences 100
# Generate with custom resource counts
node sampleData.js --clear --admin-name "Admin" --admin-email "admin@test.com" --users 200
# Clear database and generate with custom super admin and 200 users
node sampleData.js --help
# Show this help message
Output:
- All output is displayed in the terminal
- Super admin credentials and full log saved to sampleData.txt
- sampleData.txt is excluded from git for security (contains passwords)
`);
process.exit(0);
}
/**
* Prompt user for input
*/
function promptUser(question) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
return new Promise((resolve) => {
rl.question(question, (answer) => {
rl.close();
resolve(answer.trim());
});
});
}
/**
* Get super admin details interactively or from flags
*/
async function getSuperAdminDetails(args) {
let adminName = args.adminName;
let adminEmail = args.adminEmail;
// If name not provided via flag, prompt interactively
if (!adminName) {
backendLogger.info('\n👤 Super Admin Setup');
backendLogger.info('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
adminName = await promptUser('Enter super admin full name: ');
// Validate name is not empty
while (!adminName || adminName.length === 0) {
backendLogger.warn('❌ Name cannot be empty.');
adminName = await promptUser('Enter super admin full name: ');
}
}
// If email not provided via flag, prompt interactively
if (!adminEmail) {
adminEmail = await promptUser('Enter super admin email address: ');
// Validate email format
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
while (!adminEmail || !emailRegex.test(adminEmail)) {
backendLogger.warn('❌ Invalid email format.');
adminEmail = await promptUser('Enter super admin email address: ');
}
}
backendLogger.info('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
return { adminName, adminEmail };
}
/**
* Convert a "lat,lng" string to the new location schema format
* @param {string} mapLocation - Legacy format "lat,lng" string
* @param {string} name - Destination name for address
* @param {string} country - Country name for address
* @param {string} [state] - Optional state/province
* @returns {Object} Location object with geo coordinates
*/
function parseMapLocationToSchema(mapLocation, name, country, state) {
if (!mapLocation || typeof mapLocation !== 'string') {
return null;
}
const parts = mapLocation.split(',').map(p => parseFloat(p.trim()));
if (parts.length !== 2 || parts.some(isNaN)) {
return null;
}
const [lat, lng] = parts;
// Construct a human-readable address
const addressParts = [name];
if (state) addressParts.push(state);
addressParts.push(country);
const address = addressParts.join(', ');
return {
address,
geo: {
type: 'Point',
coordinates: [lng, lat] // GeoJSON format: [longitude, latitude]
},
city: name, // Destination name is typically the city
state: state || null,
country,
postalCode: null,
placeId: null
};
}
/**
* Calculate Levenshtein distance for fuzzy matching
*/
function levenshteinDistance(str1, str2) {
const s1 = str1.toLowerCase().trim();
const s2 = str2.toLowerCase().trim();
const matrix = Array(s2.length + 1).fill(null).map(() =>
Array(s1.length + 1).fill(null)
);
for (let i = 0; i <= s1.length; i++) matrix[0][i] = i;
for (let j = 0; j <= s2.length; j++) matrix[j][0] = j;
for (let j = 1; j <= s2.length; j++) {
for (let i = 1; i <= s1.length; i++) {
const cost = s1[i - 1] === s2[j - 1] ? 0 : 1;
matrix[j][i] = Math.min(
matrix[j][i - 1] + 1,
matrix[j - 1][i] + 1,
matrix[j - 1][i - 1] + cost
);
}
}
return matrix[s2.length][s1.length];
}
/**
* Calculate similarity percentage between two strings
*/
function calculateSimilarity(str1, str2) {
const distance = levenshteinDistance(str1, str2);
const maxLength = Math.max(str1.length, str2.length);
return maxLength === 0 ? 100 : ((maxLength - distance) / maxLength) * 100;
}
/**
* Check if an item already exists with fuzzy matching
*/
async function findSimilarItem(Model, name, similarityThreshold = 85) {
const allItems = await Model.find({}, 'name');
for (const item of allItems) {
const similarity = calculateSimilarity(name, item.name);
if (similarity >= similarityThreshold) {
return item;
}
}
return null;
}
/**
* Generate random string for super admin credentials
*/
function generateRandomString(length = 8) {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let result = '';
for (let i = 0; i < length; i++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
return result;
}
/**
* Get random element from array
*/
function getRandomElement(array) {
return array[Math.floor(Math.random() * array.length)];
}
/**
* Get random elements from array
*/
function getRandomElements(array, count) {
const shuffled = [...array].sort(() => 0.5 - Math.random());
return shuffled.slice(0, count);
}
/**
* Generate random number between min and max
*/
function randomBetween(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/**
* Generate random date within next year
*/
function randomFutureDate() {
const now = new Date();
const oneYearFromNow = new Date(now.getTime() + 365 * 24 * 60 * 60 * 1000);
return new Date(now.getTime() + Math.random() * (oneYearFromNow.getTime() - now.getTime()));
}
/**
* Shuffle array using Fisher-Yates algorithm
*/
function shuffleArray(array) {
const shuffled = [...array];
for (let i = shuffled.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
}
return shuffled;
}
/**
* Data generators for comprehensive sample data
*/
class DataGenerator {
constructor() {
// Massively expanded list of realistic first names (diverse, international)
this.firstNames = [
// Common English names (Classic)
'James', 'Mary', 'Robert', 'Jennifer', 'Michael', 'Linda', 'William', 'Elizabeth',
'David', 'Barbara', 'Richard', 'Susan', 'Joseph', 'Jessica', 'Thomas', 'Sarah',
'Christopher', 'Karen', 'Daniel', 'Lisa', 'Matthew', 'Nancy', 'Anthony', 'Betty',
'Mark', 'Margaret', 'Donald', 'Sandra', 'Steven', 'Ashley', 'Andrew', 'Emily',
'Paul', 'Kimberly', 'Joshua', 'Donna', 'Kenneth', 'Michelle', 'Kevin', 'Carol',
'Brian', 'Amanda', 'George', 'Dorothy', 'Edward', 'Melissa', 'Ronald', 'Deborah',
'Timothy', 'Stephanie', 'Jason', 'Rebecca', 'Jeffrey', 'Sharon', 'Ryan', 'Cynthia',
'Jacob', 'Kathleen', 'Gary', 'Amy', 'Nicholas', 'Angela', 'Eric', 'Shirley',
'Jonathan', 'Anna', 'Stephen', 'Brenda', 'Larry', 'Pamela', 'Justin', 'Emma',
'Scott', 'Nicole', 'Brandon', 'Helen', 'Benjamin', 'Samantha', 'Samuel', 'Katherine',
// Modern/Popular names (2000s-2020s)
'Liam', 'Olivia', 'Noah', 'Ava', 'Ethan', 'Sophia', 'Mason', 'Isabella',
'Logan', 'Mia', 'Lucas', 'Charlotte', 'Jackson', 'Amelia', 'Aiden', 'Harper',
'Carter', 'Evelyn', 'Jayden', 'Abigail', 'Alexander', 'Ella', 'Sebastian', 'Aria',
'Grayson', 'Scarlett', 'Matthew', 'Chloe', 'Jack', 'Victoria', 'Owen', 'Madison',
'Luke', 'Luna', 'Henry', 'Grace', 'Wyatt', 'Nora', 'Levi', 'Lily',
'Isaac', 'Hannah', 'Gabriel', 'Layla', 'Julian', 'Zoey', 'Mateo', 'Penelope',
'Anthony', 'Lillian', 'Jaxon', 'Addison', 'Lincoln', 'Aubrey', 'Joshua', 'Ellie',
// International names (East Asian)
'Wei', 'Yuki', 'Mei', 'Jin', 'Sakura', 'Akira', 'Hana', 'Kenji', 'Sora',
'Ren', 'Aiko', 'Haruto', 'Yui', 'Sota', 'Hinata', 'Riku', 'Mio', 'Kaito',
'Ming', 'Jian', 'Liang', 'Xiao', 'Yan', 'Feng', 'Ling', 'Hui', 'Jun',
'Tae', 'Soo', 'Min', 'Ji', 'Hye', 'Sung', 'Eun', 'Kyung', 'Young',
// International names (South Asian)
'Priya', 'Raj', 'Ravi', 'Anika', 'Arjun', 'Devi', 'Rohan', 'Sanjay', 'Deepak',
'Kavya', 'Vikram', 'Neha', 'Amit', 'Pooja', 'Kiran', 'Maya', 'Aditya', 'Shreya',
'Aarav', 'Ananya', 'Vihaan', 'Ishaan', 'Vivaan', 'Sara', 'Reyansh', 'Diya',
// International names (Middle Eastern/Arabic)
'Ahmed', 'Fatima', 'Hassan', 'Aisha', 'Omar', 'Layla', 'Ali', 'Zahra',
'Muhammad', 'Noor', 'Yusuf', 'Amira', 'Karim', 'Zainab', 'Ibrahim', 'Mariam',
'Khalid', 'Hala', 'Tariq', 'Rania', 'Samir', 'Leila', 'Rashid', 'Yasmin',
// International names (Hispanic/Latino)
'Carlos', 'Sofia', 'Luis', 'Diego', 'Mateo', 'Lucia', 'Marco', 'Valentina',
'Santiago', 'Isabella', 'Miguel', 'Camila', 'Gabriel', 'Valeria', 'Alejandro', 'Daniela',
'Rafael', 'Adriana', 'Fernando', 'Natalia', 'Pablo', 'Elena', 'Javier', 'Catalina',
'Antonio', 'Mariana', 'Eduardo', 'Carolina', 'Ricardo', 'Gabriela', 'Andres', 'Andrea',
// International names (European)
'Luca', 'Emma', 'Matteo', 'Alice', 'Leonardo', 'Giulia', 'Alessandro', 'Francesca',
'Pierre', 'Marie', 'Jean', 'Claire', 'Antoine', 'Camille', 'Louis', 'Manon',
'Max', 'Anna', 'Felix', 'Lena', 'Lukas', 'Mia', 'Jonas', 'Emma',
'Nikita', 'Anastasia', 'Ivan', 'Natasha', 'Dmitri', 'Olga', 'Mikhail', 'Svetlana',
'Lars', 'Ingrid', 'Erik', 'Astrid', 'Anders', 'Freya', 'Henrik', 'Sigrid',
// International names (African)
'Amara', 'Kofi', 'Zuri', 'Kwame', 'Nia', 'Jabari', 'Ayana', 'Kendi',
'Sekou', 'Makena', 'Adama', 'Zalika', 'Themba', 'Nala', 'Mandla', 'Ife',
// Unique/Modern names
'Phoenix', 'River', 'Sky', 'Ocean', 'Sage', 'Rowan', 'Quinn', 'Blair',
'Casey', 'Jordan', 'Taylor', 'Morgan', 'Riley', 'Avery', 'Cameron', 'Dylan'
];
// Massively expanded list of realistic last names (diverse origins)
this.lastNames = [
// Common English/American surnames
'Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis',
'Rodriguez', 'Martinez', 'Hernandez', 'Lopez', 'Gonzalez', 'Wilson', 'Anderson',
'Thomas', 'Taylor', 'Moore', 'Jackson', 'Martin', 'Lee', 'Perez', 'Thompson',
'White', 'Harris', 'Sanchez', 'Clark', 'Ramirez', 'Lewis', 'Robinson', 'Walker',
'Young', 'Allen', 'King', 'Wright', 'Scott', 'Torres', 'Nguyen', 'Hill', 'Flores',
'Green', 'Adams', 'Nelson', 'Baker', 'Hall', 'Rivera', 'Campbell', 'Mitchell',
'Carter', 'Roberts', 'Gomez', 'Phillips', 'Evans', 'Turner', 'Diaz', 'Parker',
'Cruz', 'Edwards', 'Collins', 'Reyes', 'Stewart', 'Morris', 'Morales', 'Murphy',
'Cook', 'Rogers', 'Morgan', 'Peterson', 'Cooper', 'Reed', 'Bailey', 'Bell',
'Howard', 'Ward', 'Cox', 'Richardson', 'Wood', 'Watson', 'Brooks', 'Bennett',
'Gray', 'James', 'Reyes', 'Powell', 'Perry', 'Russell', 'Sullivan', 'Jenkins',
// East Asian surnames
'Chen', 'Wang', 'Li', 'Zhang', 'Liu', 'Yang', 'Huang', 'Zhao', 'Wu', 'Zhou',
'Xu', 'Sun', 'Ma', 'Zhu', 'Hu', 'Guo', 'He', 'Gao', 'Lin', 'Luo',
'Kim', 'Park', 'Choi', 'Jung', 'Kang', 'Cho', 'Yoon', 'Jang', 'Lim', 'Han',
'Yamamoto', 'Tanaka', 'Suzuki', 'Watanabe', 'Ito', 'Nakamura', 'Kobayashi', 'Kato',
'Yoshida', 'Yamada', 'Sasaki', 'Yamaguchi', 'Matsumoto', 'Inoue', 'Kimura', 'Hayashi',
// South Asian surnames
'Kumar', 'Singh', 'Patel', 'Sharma', 'Gupta', 'Khan', 'Reddy', 'Rao',
'Agarwal', 'Jain', 'Desai', 'Mehta', 'Shah', 'Verma', 'Malhotra', 'Chopra',
'Kapoor', 'Bose', 'Das', 'Mukherjee', 'Banerjee', 'Chatterjee', 'Nair', 'Menon',
// European surnames (Romance languages)
'Silva', 'Santos', 'Costa', 'Oliveira', 'Pereira', 'Ferreira', 'Rodrigues', 'Alves',
'Rossi', 'Russo', 'Ferrari', 'Esposito', 'Bianchi', 'Romano', 'Colombo', 'Ricci',
'Moreau', 'Bernard', 'Dubois', 'Thomas', 'Robert', 'Richard', 'Petit', 'Durand',
'Leroy', 'Moreau', 'Simon', 'Laurent', 'Lefebvre', 'Michel', 'Garcia', 'Martinez',
// European surnames (Germanic)
'Müller', 'Schmidt', 'Schneider', 'Fischer', 'Weber', 'Meyer', 'Wagner', 'Becker',
'Schulz', 'Hoffmann', 'Koch', 'Richter', 'Klein', 'Wolf', 'Schröder', 'Neumann',
'Schwarz', 'Zimmermann', 'Braun', 'Hofmann', 'Hartmann', 'Lange', 'Schmitt', 'Werner',
// European surnames (Slavic)
'Ivanov', 'Petrov', 'Sidorov', 'Popov', 'Volkov', 'Sokolov', 'Lebedev', 'Kozlov',
'Novak', 'Kowalski', 'Nowak', 'Wojcik', 'Kowalczyk', 'Kaminski', 'Lewandowski',
'Zielinski', 'Szymanski', 'Wozniak', 'Dabrowski', 'Jankowski', 'Mazur', 'Kwiatkowski',
// European surnames (Nordic)
'Nielsen', 'Hansen', 'Andersen', 'Pedersen', 'Christensen', 'Larsen', 'Sørensen',
'Rasmussen', 'Jørgensen', 'Petersen', 'Madsen', 'Kristensen', 'Olsen', 'Thomsen',
'Johansson', 'Karlsson', 'Nilsson', 'Eriksson', 'Larsson', 'Olsson', 'Persson',
// European surnames (Celtic/British Isles)
"O'Brien", 'Murphy', 'Kelly', "O'Sullivan", 'Walsh', "O'Connor", 'McCarthy', 'Gallagher',
'Doherty', 'Kennedy', 'Lynch', 'Murray', "O'Neill", 'Quinn', 'Moore', 'McLaughlin',
'Davies', 'Evans', 'Thomas', 'Roberts', 'Lewis', 'Hughes', 'Morgan', 'Griffiths',
// Middle Eastern/North African surnames
'Hassan', 'Ali', 'Ahmed', 'Hussein', 'Ibrahim', 'Mahmoud', 'Abdullah', 'Mohammed',
'Omar', 'Khalil', 'Rashid', 'Farid', 'Nasser', 'Salem', 'Hamid', 'Amin',
// Hungarian surnames
'Kovács', 'Nagy', 'Tóth', 'Szabó', 'Horváth', 'Varga', 'Kiss', 'Molnár',
'Németh', 'Farkas', 'Balogh', 'Papp', 'Takács', 'Juhász', 'Lakatos', 'Mészáros',
// African surnames
'Diallo', 'Diop', 'Ndiaye', 'Fall', 'Sow', 'Sy', 'Ba', 'Thiam',
'Mensah', 'Owusu', 'Asante', 'Boateng', 'Osei', 'Agyemang', 'Ofori', 'Opoku',
'Okafor', 'Okonkwo', 'Nwosu', 'Eze', 'Okeke', 'Chukwu', 'Obi', 'Mbah'
];
// Realistic email domains
this.domains = [
'gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com', 'icloud.com',
'protonmail.com', 'mail.com', 'aol.com', 'zoho.com', 'yandex.com'
];
// Track generated emails to prevent duplicates
this.usedEmails = new Set();
this.usedNames = new Set();
this.destinations = [
// Europe - Western
{ name: 'Paris', country: 'France', state: 'Île-de-France', map_location: '48.8566,2.3522' },
{ name: 'London', country: 'United Kingdom', map_location: '51.5074,-0.1278' },
{ name: 'Rome', country: 'Italy', map_location: '41.9028,12.4964' },
{ name: 'Barcelona', country: 'Spain', map_location: '41.3851,2.1734' },
{ name: 'Amsterdam', country: 'Netherlands', map_location: '52.3676,4.9041' },
{ name: 'Berlin', country: 'Germany', map_location: '52.5200,13.4050' },
{ name: 'Vienna', country: 'Austria', map_location: '48.2082,16.3738' },
{ name: 'Zurich', country: 'Switzerland', map_location: '47.3769,8.5417' },
{ name: 'Brussels', country: 'Belgium', map_location: '50.8503,4.3517' },
{ name: 'Munich', country: 'Germany', map_location: '48.1351,11.5820' },
{ name: 'Milan', country: 'Italy', map_location: '45.4642,9.1900' },
{ name: 'Florence', country: 'Italy', map_location: '43.7696,11.2558' },
{ name: 'Venice', country: 'Italy', map_location: '45.4408,12.3155' },
{ name: 'Madrid', country: 'Spain', map_location: '40.4168,-3.7038' },
{ name: 'Lisbon', country: 'Portugal', map_location: '38.7223,-9.1393' },
{ name: 'Porto', country: 'Portugal', map_location: '41.1579,-8.6291' },
{ name: 'Edinburgh', country: 'United Kingdom', map_location: '55.9533,-3.1883' },
{ name: 'Dublin', country: 'Ireland', map_location: '53.3498,-6.2603' },
{ name: 'Lyon', country: 'France', map_location: '45.7640,4.8357' },
{ name: 'Bordeaux', country: 'France', map_location: '44.8378,-0.5792' },
{ name: 'Nice', country: 'France', map_location: '43.7102,7.2620' },
{ name: 'Geneva', country: 'Switzerland', map_location: '46.2044,6.1432' },
{ name: 'Copenhagen', country: 'Denmark', map_location: '55.6761,12.5683' },
{ name: 'Stockholm', country: 'Sweden', map_location: '59.3293,18.0686' },
{ name: 'Oslo', country: 'Norway', map_location: '59.9139,10.7522' },
{ name: 'Helsinki', country: 'Finland', map_location: '60.1699,24.9384' },
// Europe - Eastern & Central
{ name: 'Prague', country: 'Czech Republic', map_location: '50.0755,14.4378' },
{ name: 'Budapest', country: 'Hungary', map_location: '47.4979,19.0402' },
{ name: 'Krakow', country: 'Poland', map_location: '50.0647,19.9450' },
{ name: 'Warsaw', country: 'Poland', map_location: '52.2297,21.0122' },
{ name: 'Dubrovnik', country: 'Croatia', map_location: '42.6507,18.0944' },
{ name: 'Split', country: 'Croatia', map_location: '43.5081,16.4402' },
{ name: 'Athens', country: 'Greece', map_location: '37.9838,23.7275' },
{ name: 'Santorini', country: 'Greece', map_location: '36.3932,25.4615' },
{ name: 'Istanbul', country: 'Turkey', map_location: '41.0082,28.9784' },
{ name: 'Antalya', country: 'Turkey', map_location: '36.8969,30.7133' },
{ name: 'Bucharest', country: 'Romania', map_location: '44.4268,26.1025' },
{ name: 'Sofia', country: 'Bulgaria', map_location: '42.6977,23.3219' },
{ name: 'Tallinn', country: 'Estonia', map_location: '59.4370,24.7536' },
{ name: 'Riga', country: 'Latvia', map_location: '56.9496,24.1052' },
{ name: 'Vilnius', country: 'Lithuania', map_location: '54.6872,25.2797' },
// Asia - East
{ name: 'Tokyo', country: 'Japan', map_location: '35.6762,139.6503' },
{ name: 'Kyoto', country: 'Japan', map_location: '35.0116,135.7681' },
{ name: 'Osaka', country: 'Japan', map_location: '34.6937,135.5023' },
{ name: 'Seoul', country: 'South Korea', map_location: '37.5665,126.9780' },
{ name: 'Busan', country: 'South Korea', map_location: '35.1796,129.0756' },
{ name: 'Beijing', country: 'China', map_location: '39.9042,116.4074' },
{ name: 'Shanghai', country: 'China', map_location: '31.2304,121.4737' },
{ name: 'Hong Kong', country: 'China', map_location: '22.3193,114.1694' },
{ name: 'Taipei', country: 'Taiwan', map_location: '25.0330,121.5654' },
{ name: 'Hanoi', country: 'Vietnam', map_location: '21.0285,105.8542' },
{ name: 'Ho Chi Minh City', country: 'Vietnam', map_location: '10.8231,106.6297' },
// Asia - Southeast
{ name: 'Bangkok', country: 'Thailand', map_location: '13.7563,100.5018' },
{ name: 'Phuket', country: 'Thailand', map_location: '7.8804,98.3923' },
{ name: 'Chiang Mai', country: 'Thailand', map_location: '18.7883,98.9853' },
{ name: 'Singapore', country: 'Singapore', map_location: '1.3521,103.8198' },
{ name: 'Bali', country: 'Indonesia', map_location: '-8.3405,115.0920' },
{ name: 'Jakarta', country: 'Indonesia', map_location: '-6.2088,106.8456' },
{ name: 'Kuala Lumpur', country: 'Malaysia', map_location: '3.1390,101.6869' },
{ name: 'Penang', country: 'Malaysia', map_location: '5.4141,100.3288' },
{ name: 'Manila', country: 'Philippines', map_location: '14.5995,120.9842' },
{ name: 'Cebu', country: 'Philippines', map_location: '10.3157,123.8854' },
{ name: 'Siem Reap', country: 'Cambodia', map_location: '13.3671,103.8448' },
{ name: 'Yangon', country: 'Myanmar', map_location: '16.8661,96.1951' },
{ name: 'Vientiane', country: 'Laos', map_location: '17.9757,102.6331' },
// Asia - South
{ name: 'Mumbai', country: 'India', map_location: '19.0760,72.8777' },
{ name: 'Delhi', country: 'India', map_location: '28.7041,77.1025' },
{ name: 'Bangalore', country: 'India', map_location: '12.9716,77.5946' },
{ name: 'Jaipur', country: 'India', map_location: '26.9124,75.7873' },
{ name: 'Goa', country: 'India', map_location: '15.2993,74.1240' },
{ name: 'Kathmandu', country: 'Nepal', map_location: '27.7172,85.3240' },
{ name: 'Colombo', country: 'Sri Lanka', map_location: '6.9271,79.8612' },
{ name: 'Dhaka', country: 'Bangladesh', map_location: '23.8103,90.4125' },
// Middle East
{ name: 'Dubai', country: 'United Arab Emirates', map_location: '25.2048,55.2708' },
{ name: 'Abu Dhabi', country: 'United Arab Emirates', map_location: '24.4539,54.3773' },
{ name: 'Doha', country: 'Qatar', map_location: '25.2854,51.5310' },
{ name: 'Muscat', country: 'Oman', map_location: '23.5880,58.3829' },
{ name: 'Tel Aviv', country: 'Israel', map_location: '32.0853,34.7818' },
{ name: 'Jerusalem', country: 'Israel', map_location: '31.7683,35.2137' },
{ name: 'Amman', country: 'Jordan', map_location: '31.9454,35.9284' },
{ name: 'Beirut', country: 'Lebanon', map_location: '33.8886,35.4955' },
{ name: 'Cairo', country: 'Egypt', map_location: '30.0444,31.2357' },
{ name: 'Marrakech', country: 'Morocco', map_location: '31.6295,-7.9811' },
{ name: 'Casablanca', country: 'Morocco', map_location: '33.5731,-7.5898' },
// North America
{ name: 'New York City', country: 'United States', state: 'New York', map_location: '40.7128,-74.0060' },
{ name: 'Los Angeles', country: 'United States', state: 'California', map_location: '34.0522,-118.2437' },
{ name: 'San Francisco', country: 'United States', state: 'California', map_location: '37.7749,-122.4194' },
{ name: 'Miami', country: 'United States', state: 'Florida', map_location: '25.7617,-80.1918' },
{ name: 'Las Vegas', country: 'United States', state: 'Nevada', map_location: '36.1699,-115.1398' },
{ name: 'Chicago', country: 'United States', state: 'Illinois', map_location: '41.8781,-87.6298' },
{ name: 'Seattle', country: 'United States', state: 'Washington', map_location: '47.6062,-122.3321' },
{ name: 'Boston', country: 'United States', state: 'Massachusetts', map_location: '42.3601,-71.0589' },
{ name: 'Washington DC', country: 'United States', state: 'District of Columbia', map_location: '38.9072,-77.0369' },
{ name: 'New Orleans', country: 'United States', state: 'Louisiana', map_location: '29.9511,-90.0715' },
{ name: 'Austin', country: 'United States', state: 'Texas', map_location: '30.2672,-97.7431' },
{ name: 'Nashville', country: 'United States', state: 'Tennessee', map_location: '36.1627,-86.7816' },
{ name: 'Portland', country: 'United States', state: 'Oregon', map_location: '45.5152,-122.6784' },
{ name: 'Denver', country: 'United States', state: 'Colorado', map_location: '39.7392,-104.9903' },
{ name: 'San Diego', country: 'United States', state: 'California', map_location: '32.7157,-117.1611' },
{ name: 'Honolulu', country: 'United States', state: 'Hawaii', map_location: '21.3069,-157.8583' },
{ name: 'Anchorage', country: 'United States', state: 'Alaska', map_location: '61.2181,-149.9003' },
// Canada
{ name: 'Vancouver', country: 'Canada', state: 'British Columbia', map_location: '49.2827,-123.1207' },
{ name: 'Toronto', country: 'Canada', state: 'Ontario', map_location: '43.6532,-79.3832' },
{ name: 'Montreal', country: 'Canada', state: 'Quebec', map_location: '45.5017,-73.5673' },
{ name: 'Banff', country: 'Canada', state: 'Alberta', map_location: '51.1784,-115.5708' },
{ name: 'Quebec City', country: 'Canada', state: 'Quebec', map_location: '46.8139,-71.2080' },
{ name: 'Calgary', country: 'Canada', state: 'Alberta', map_location: '51.0447,-114.0719' },
{ name: 'Ottawa', country: 'Canada', state: 'Ontario', map_location: '45.4215,-75.6972' },
{ name: 'Victoria', country: 'Canada', state: 'British Columbia', map_location: '48.4284,-123.3656' },
{ name: 'Whistler', country: 'Canada', state: 'British Columbia', map_location: '50.1163,-122.9574' },
// Mexico & Central America
{ name: 'Cancun', country: 'Mexico', map_location: '21.1619,-86.8515' },
{ name: 'Mexico City', country: 'Mexico', map_location: '19.4326,-99.1332' },
{ name: 'Tulum', country: 'Mexico', map_location: '20.2114,-87.4654' },
{ name: 'Playa del Carmen', country: 'Mexico', map_location: '20.6296,-87.0739' },
{ name: 'Puerto Vallarta', country: 'Mexico', map_location: '20.6534,-105.2253' },
{ name: 'Cabo San Lucas', country: 'Mexico', map_location: '22.8905,-109.9167' },
{ name: 'San José', country: 'Costa Rica', map_location: '9.9281,-84.0907' },
{ name: 'Panama City', country: 'Panama', map_location: '8.9824,-79.5199' },
{ name: 'Guatemala City', country: 'Guatemala', map_location: '14.6349,-90.5069' },
{ name: 'San Salvador', country: 'El Salvador', map_location: '13.6929,-89.2182' },
// South America
{ name: 'Buenos Aires', country: 'Argentina', map_location: '-34.6118,-58.3966' },
{ name: 'Rio de Janeiro', country: 'Brazil', map_location: '-22.9068,-43.1729' },
{ name: 'São Paulo', country: 'Brazil', map_location: '-23.5505,-46.6333' },
{ name: 'Lima', country: 'Peru', map_location: '-12.0464,-77.0428' },
{ name: 'Cusco', country: 'Peru', map_location: '-13.5319,-71.9675' },
{ name: 'Machu Picchu', country: 'Peru', map_location: '-13.1631,-72.5450' },
{ name: 'Santiago', country: 'Chile', map_location: '-33.4489,-70.6693' },
{ name: 'Valparaíso', country: 'Chile', map_location: '-33.0472,-71.6127' },
{ name: 'Patagonia', country: 'Chile', map_location: '-53.1638,-70.9171' },
{ name: 'Cartagena', country: 'Colombia', map_location: '10.3910,-75.4794' },
{ name: 'Bogotá', country: 'Colombia', map_location: '4.7110,-74.0721' },
{ name: 'Medellín', country: 'Colombia', map_location: '6.2486,-75.5742' },
{ name: 'Quito', country: 'Ecuador', map_location: '-0.1807,-78.4678' },
{ name: 'Galápagos Islands', country: 'Ecuador', map_location: '-0.9538,-90.9656' },
{ name: 'La Paz', country: 'Bolivia', map_location: '-16.5000,-68.1500' },
{ name: 'Montevideo', country: 'Uruguay', map_location: '-34.9011,-56.1645' },
// Oceania
{ name: 'Sydney', country: 'Australia', state: 'New South Wales', map_location: '-33.8688,151.2093' },
{ name: 'Melbourne', country: 'Australia', state: 'Victoria', map_location: '-37.8136,144.9631' },
{ name: 'Brisbane', country: 'Australia', state: 'Queensland', map_location: '-27.4698,153.0251' },
{ name: 'Perth', country: 'Australia', state: 'Western Australia', map_location: '-31.9505,115.8605' },
{ name: 'Adelaide', country: 'Australia', state: 'South Australia', map_location: '-34.9285,138.6007' },
{ name: 'Gold Coast', country: 'Australia', state: 'Queensland', map_location: '-28.0167,153.4000' },
{ name: 'Cairns', country: 'Australia', state: 'Queensland', map_location: '-16.9186,145.7781' },
{ name: 'Auckland', country: 'New Zealand', map_location: '-36.8485,174.7633' },
{ name: 'Wellington', country: 'New Zealand', map_location: '-41.2865,174.7762' },
{ name: 'Queenstown', country: 'New Zealand', map_location: '-45.0312,168.6626' },
{ name: 'Christchurch', country: 'New Zealand', map_location: '-43.5321,172.6362' },
{ name: 'Rotorua', country: 'New Zealand', map_location: '-38.1368,176.2497' },
{ name: 'Fiji Islands', country: 'Fiji', map_location: '-17.7134,178.0650' },
{ name: 'Bora Bora', country: 'French Polynesia', map_location: '-16.5004,-151.7414' },
// Africa
{ name: 'Cape Town', country: 'South Africa', map_location: '-33.9249,18.4241' },
{ name: 'Johannesburg', country: 'South Africa', map_location: '-26.2041,28.0473' },
{ name: 'Nairobi', country: 'Kenya', map_location: '-1.2864,36.8172' },
{ name: 'Lagos', country: 'Nigeria', map_location: '6.5244,3.3792' },
{ name: 'Accra', country: 'Ghana', map_location: '5.6037,-0.1870' },
{ name: 'Zanzibar', country: 'Tanzania', map_location: '-6.1659,39.2026' },
{ name: 'Addis Ababa', country: 'Ethiopia', map_location: '9.0320,38.7469' },
{ name: 'Dakar', country: 'Senegal', map_location: '14.7167,-17.4677' },
{ name: 'Tunis', country: 'Tunisia', map_location: '36.8065,10.1815' },
// Nordics & Scandinavia
{ name: 'Reykjavik', country: 'Iceland', map_location: '64.1466,-21.9426' },
{ name: 'Tromsø', country: 'Norway', map_location: '69.6492,18.9553' },
{ name: 'Bergen', country: 'Norway', map_location: '60.3913,5.3221' },
{ name: 'Gothenburg', country: 'Sweden', map_location: '57.7089,11.9746' },
{ name: 'Malmö', country: 'Sweden', map_location: '55.6050,13.0038' },
{ name: 'Aarhus', country: 'Denmark', map_location: '56.1629,10.2039' },
{ name: 'Turku', country: 'Finland', map_location: '60.4518,22.2666' },
// Island Nations & Special Regions
{ name: 'Maldives', country: 'Maldives', map_location: '3.2028,73.2207' },
{ name: 'Seychelles', country: 'Seychelles', map_location: '-4.6796,55.4920' },
{ name: 'Mauritius', country: 'Mauritius', map_location: '-20.1609,57.5012' },
{ name: 'Bermuda', country: 'Bermuda', map_location: '32.3078,-64.7505' },
{ name: 'Bahamas', country: 'Bahamas', map_location: '25.0343,-77.3963' },
{ name: 'Barbados', country: 'Barbados', map_location: '13.1939,-59.5432' },
{ name: 'Jamaica', country: 'Jamaica', map_location: '18.1096,-77.2975' },
{ name: 'Aruba', country: 'Aruba', map_location: '12.5211,-69.9683' },
// Mountain/Ski Destinations
{ name: 'Innsbruck', country: 'Austria', map_location: '47.2692,11.4041' },
{ name: 'Zermatt', country: 'Switzerland', map_location: '46.0207,7.7491' },
{ name: 'Chamonix', country: 'France', map_location: '45.9237,6.8694' },
{ name: 'Aspen', country: 'United States', state: 'Colorado', map_location: '39.1911,-106.8175' },
{ name: 'Lake Tahoe', country: 'United States', state: 'California', map_location: '39.0968,-120.0324' }
];
this.experienceTypes = [
// Travel Styles
'Romantic', 'Cultural', 'Adventure', 'Food & Wine', 'Beach', 'Urban', 'Nature',
'Historical', 'Shopping', 'Nightlife', 'Family', 'Luxury', 'Budget', 'Solo Travel',
'Group Travel', 'Photography', 'Wellness', 'Business', 'Education', 'Volunteering',
// Activity Types
'Hiking', 'Skiing', 'Surfing', 'Diving', 'Cycling', 'Kayaking', 'Rock Climbing',
'Safari', 'Whale Watching', 'Birdwatching', 'Snorkeling', 'Sailing', 'Fishing',
// Experience Focus
'Art & Museums', 'Music & Festivals', 'Spiritual', 'Culinary Tour', 'Wine Tasting',
'Coffee Culture', 'Street Food', 'Fine Dining', 'Cooking Classes', 'Local Markets',
// Special Interest
'Architecture', 'Design', 'Film & Cinema', 'Literature', 'Theater', 'Dance',
'Nightlife', 'Pub Crawl', 'Rooftop Bars', 'Beach Clubs', 'Live Music',
// Seasonal
'Winter Sports', 'Summer Activities', 'Fall Foliage', 'Spring Blossoms',
'Cherry Blossom', 'Northern Lights', 'Midnight Sun', 'Monsoon Season',
// Wellness & Relaxation
'Spa & Massage', 'Yoga Retreat', 'Meditation', 'Hot Springs', 'Thermal Baths',
'Detox', 'Fitness', 'Beach Relaxation', 'Mountain Retreat',
// Adventure Levels
'Extreme Sports', 'Adrenaline', 'Moderate Activity', 'Leisurely Pace', 'Off-the-Grid',
'Backpacking', 'Glamping', 'Camping', 'RV Travel', 'Road Trip',
// Cultural Immersion
'Language Learning', 'Homestay', 'Farm Stay', 'Village Visit', 'Temple Tour',
'Religious Sites', 'Indigenous Culture', 'Traditional Crafts', 'Local Festivals'
];
this.unsplashUrls = [
'https://images.unsplash.com/photo-1431274172761-fca41d930114?w=800',
'https://images.unsplash.com/photo-1540959733332-eab4deabeeaf?w=800',
'https://images.unsplash.com/photo-1496442226666-8d4d0e62e6e9?w=800',
'https://images.unsplash.com/photo-1542051841857-5f90071e7989?w=800',
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800',
'https://images.unsplash.com/photo-1580060839134-75a5edca2e99?w=800',
'https://images.unsplash.com/photo-1516483638261-f4dbaf036963?w=800',
'https://images.unsplash.com/photo-1531572753322-ad063cecc140?w=800',
'https://images.unsplash.com/photo-1502920917128-1aa500764cbd?w=800',
'https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=800',
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800',
'https://images.unsplash.com/photo-1527631746610-bca00a040d60?w=800',
'https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?w=800',
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800',
'https://images.unsplash.com/photo-1542314831-068cd1dbfeeb?w=800',
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800',
'https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?w=800',
'https://images.unsplash.com/photo-1542314831-068cd1dbfeeb?w=800',
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800',
'https://images.unsplash.com/photo-1527631746610-bca00a040d60?w=800'
];
this.planItemTemplates = [
// Accommodation
{ text: 'Book hotel accommodation', cost_range: [80, 500], days_range: [1, 7], activity_type: 'accommodation' },
{ text: 'Reserve hostel bed', cost_range: [20, 80], days_range: [1, 5], activity_type: 'accommodation' },
{ text: 'Book luxury resort', cost_range: [300, 1500], days_range: [1, 10], activity_type: 'accommodation' },
{ text: 'Rent vacation apartment', cost_range: [100, 400], days_range: [3, 14], activity_type: 'accommodation' },
{ text: 'Book boutique hotel', cost_range: [150, 600], days_range: [1, 5], activity_type: 'accommodation' },
{ text: 'Reserve glamping site', cost_range: [120, 350], days_range: [1, 4], activity_type: 'accommodation' },
// Transportation
{ text: 'Purchase flight tickets', cost_range: [200, 1200], days_range: [1, 3], activity_type: 'transport' },
{ text: 'Book train tickets', cost_range: [30, 200], days_range: [1, 2], activity_type: 'transport' },
{ text: 'Rent car for duration', cost_range: [150, 800], days_range: [1, 7], activity_type: 'transport' },
{ text: 'Purchase ferry tickets', cost_range: [25, 150], days_range: [1, 1], activity_type: 'transport' },
{ text: 'Book airport transfer', cost_range: [30, 100], days_range: [1, 1], activity_type: 'transport' },
{ text: 'Purchase metro/subway pass', cost_range: [15, 80], days_range: [1, 1], activity_type: 'transport' },
{ text: 'Book intercity bus', cost_range: [20, 100], days_range: [1, 2], activity_type: 'transport' },
{ text: 'Arrange private driver', cost_range: [50, 300], days_range: [1, 3], activity_type: 'transport' },
{ text: 'Rent bicycle for city tour', cost_range: [10, 50], days_range: [1, 1], activity_type: 'transport' },
{ text: 'Book helicopter tour', cost_range: [200, 800], days_range: [1, 2], activity_type: 'tour' },
// Dining & Food
{ text: 'Reserve fine dining restaurant', cost_range: [80, 300], days_range: [1, 2], activity_type: 'food' },
{ text: 'Book food tour', cost_range: [40, 150], days_range: [1, 1], activity_type: 'food' },
{ text: 'Reserve rooftop bar table', cost_range: [50, 200], days_range: [1, 1], activity_type: 'drinks' },
{ text: 'Book cooking class', cost_range: [40, 150], days_range: [1, 2], activity_type: 'food' },
{ text: 'Reserve wine tasting', cost_range: [30, 180], days_range: [1, 2], activity_type: 'drinks' },
{ text: 'Book brewery tour', cost_range: [25, 80], days_range: [1, 1], activity_type: 'drinks' },
{ text: 'Purchase street food tour', cost_range: [20, 70], days_range: [1, 1], activity_type: 'food' },
{ text: 'Book coffee tasting experience', cost_range: [25, 90], days_range: [1, 1], activity_type: 'coffee' },
{ text: 'Reserve chef table experience', cost_range: [150, 500], days_range: [1, 2], activity_type: 'food' },
// Activities & Tours
{ text: 'Book guided city tour', cost_range: [20, 120], days_range: [1, 2], activity_type: 'tour' },
{ text: 'Purchase museum tickets', cost_range: [15, 60], days_range: [1, 1], activity_type: 'museum' },
{ text: 'Book adventure activity', cost_range: [60, 350], days_range: [1, 5], activity_type: 'adventure' },
{ text: 'Reserve spa treatment', cost_range: [50, 300], days_range: [1, 2], activity_type: 'wellness' },
{ text: 'Book scuba diving excursion', cost_range: [80, 250], days_range: [1, 3], activity_type: 'adventure' },
{ text: 'Purchase theme park tickets', cost_range: [40, 150], days_range: [1, 2], activity_type: 'entertainment' },
{ text: 'Book hot air balloon ride', cost_range: [150, 400], days_range: [1, 2], activity_type: 'adventure' },
{ text: 'Reserve kayaking tour', cost_range: [40, 120], days_range: [1, 2], activity_type: 'adventure' },
{ text: 'Book zip-lining adventure', cost_range: [50, 180], days_range: [1, 1], activity_type: 'adventure' },
{ text: 'Purchase snorkeling equipment rental', cost_range: [20, 60], days_range: [1, 3], activity_type: 'adventure' },
{ text: 'Book whale watching tour', cost_range: [70, 200], days_range: [1, 2], activity_type: 'nature' },
{ text: 'Reserve rock climbing session', cost_range: [40, 150], days_range: [1, 2], activity_type: 'sports' },
{ text: 'Book paragliding experience', cost_range: [100, 300], days_range: [1, 2], activity_type: 'adventure' },
{ text: 'Purchase safari tour', cost_range: [200, 800], days_range: [2, 7], activity_type: 'nature' },
// Cultural & Educational
{ text: 'Book historical walking tour', cost_range: [25, 100], days_range: [1, 1], activity_type: 'sightseeing' },
{ text: 'Reserve traditional show tickets', cost_range: [30, 150], days_range: [1, 2], activity_type: 'entertainment' },
{ text: 'Book language lesson', cost_range: [20, 80], days_range: [1, 5], activity_type: 'class' },
{ text: 'Purchase concert tickets', cost_range: [40, 250], days_range: [1, 3], activity_type: 'entertainment' },
{ text: 'Book photography workshop', cost_range: [60, 250], days_range: [1, 3], activity_type: 'photography' },
{ text: 'Reserve art gallery tour', cost_range: [20, 100], days_range: [1, 1], activity_type: 'museum' },
{ text: 'Book theater performance', cost_range: [40, 200], days_range: [1, 2], activity_type: 'entertainment' },
{ text: 'Purchase opera tickets', cost_range: [60, 300], days_range: [1, 2], activity_type: 'entertainment' },
// Wellness & Relaxation
{ text: 'Book yoga class', cost_range: [15, 60], days_range: [1, 5], activity_type: 'wellness' },
{ text: 'Reserve massage appointment', cost_range: [40, 180], days_range: [1, 2], activity_type: 'wellness' },
{ text: 'Book meditation session', cost_range: [20, 100], days_range: [1, 3], activity_type: 'wellness' },
{ text: 'Purchase hot springs entry', cost_range: [15, 80], days_range: [1, 2], activity_type: 'wellness' },
{ text: 'Book wellness retreat day', cost_range: [100, 500], days_range: [1, 3], activity_type: 'wellness' },
// Shopping & Souvenirs
{ text: 'Visit local market', cost_range: [5, 50], days_range: [1, 1], activity_type: 'market' },
{ text: 'Book shopping tour', cost_range: [30, 120], days_range: [1, 2], activity_type: 'shopping' },
{ text: 'Purchase craft workshop', cost_range: [25, 100], days_range: [1, 2], activity_type: 'class' },
// Miscellaneous
{ text: 'Purchase travel insurance', cost_range: [30, 150], days_range: [1, 1], activity_type: 'admin' },
{ text: 'Book visa assistance', cost_range: [50, 200], days_range: [7, 14], activity_type: 'admin' },
{ text: 'Reserve luggage storage', cost_range: [5, 30], days_range: [1, 1], activity_type: 'admin' },
{ text: 'Purchase SIM card/eSIM', cost_range: [10, 50], days_range: [1, 1], activity_type: 'admin' },
{ text: 'Book photography session', cost_range: [60, 250], days_range: [1, 2], activity_type: 'photography' }
];
}
/**
* Generate unique email address
*/
generateUniqueEmail(firstName, lastName) {
const domain = getRandomElement(this.domains);
const baseEmail = `${firstName.toLowerCase()}.${lastName.toLowerCase()}`;
// Try base email first
let email = `${baseEmail}@${domain}`;
if (!this.usedEmails.has(email)) {
this.usedEmails.add(email);
return email;
}
// Try with random numbers
for (let attempt = 0; attempt < 100; attempt++) {
const randomNum = randomBetween(1, 9999);
email = `${baseEmail}${randomNum}@${domain}`;
if (!this.usedEmails.has(email)) {
this.usedEmails.add(email);
return email;
}
}
// Fallback: add timestamp + random string
const timestamp = Date.now().toString().slice(-6);
email = `${baseEmail}.${timestamp}${generateRandomString(4)}@${domain}`;
this.usedEmails.add(email);
return email;
}
/**
* Generate unique name
*/
generateUniqueName() {
const maxAttempts = 1000;
for (let attempt = 0; attempt < maxAttempts; attempt++) {
const firstName = getRandomElement(this.firstNames);
const lastName = getRandomElement(this.lastNames);
const name = `${firstName} ${lastName}`;
if (!this.usedNames.has(name)) {
this.usedNames.add(name);
return { firstName, lastName, name };
}
}
// Fallback: add middle initial
const firstName = getRandomElement(this.firstNames);
const lastName = getRandomElement(this.lastNames);
const middleInitial = String.fromCharCode(65 + Math.floor(Math.random() * 26)); // A-Z
const name = `${firstName} ${middleInitial}. ${lastName}`;
this.usedNames.add(name);
return { firstName, lastName, name };
}
/**
* Generate invite codes (short alphanumeric format: XXX-XXX-XXX)
*/
generateInviteCode() {
const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
const segments = 3;
const segmentLength = 3;
const code = [];
for (let i = 0; i < segments; i++) {
let segment = '';
for (let j = 0; j < segmentLength; j++) {
segment += chars[Math.floor(Math.random() * chars.length)];
}
code.push(segment);
}
return code.join('-');
}
/**
* Generate session ID (UUID-like format)
*/
generateSessionId() {
return `sess_${generateRandomString(32)}`;
}
/**
* Generate users with varied profiles (no duplicates)
* @param {number} count - Total number of users to generate
* @param {Object} adminDetails - Custom super admin details (optional)
* @param {string} adminDetails.name - Super admin full name
* @param {string} adminDetails.email - Super admin email address
*/
generateUsers(count = 180, adminDetails = null) {
const users = [];
// Create super admin first
const superAdminName = adminDetails?.name || `SuperAdmin_${generateRandomString(6)}`;
const superAdminEmail = adminDetails?.email || `superadmin_${generateRandomString(8).toLowerCase()}@biensperience.demo`;
const superAdminPassword = generateRandomString(12);
const sessionId = this.generateSessionId();
const now = Date.now();
const expiresAt = now + (24 * 60 * 60 * 1000); // 24 hours
const superAdmin = {
name: superAdminName,
email: superAdminEmail,
password: superAdminPassword,
role: 'super_admin',
isSuperAdmin: true,
emailConfirmed: true, // Super admin always verified
apiEnabled: true, // Enable API access for super admin
visibility: 'public',
currentSessionId: sessionId,
sessionCreatedAt: now,
sessionExpiresAt: expiresAt,
credentials: { name: superAdminName, email: superAdminEmail, password: superAdminPassword }
};
users.push(superAdmin);
this.usedEmails.add(superAdminEmail);
this.usedNames.add(superAdminName);
// Create Archive User - system user for archiving experiences when owner deletes
// Uses fixed ObjectId for consistent reference across environments
const archiveUser = {
_id: new mongoose.Types.ObjectId('000000000000000000000001'),
name: 'Archived User',
email: 'archived@biensperience.system',
password: generateRandomString(32), // Random unguessable password - this user cannot login
role: 'regular_user',
isSystemUser: true,
isArchiveUser: true,
emailConfirmed: true,
apiEnabled: false,
visibility: 'private', // Blackhole profile should not be publicly accessible
preferences: {
theme: 'system-default',
currency: 'USD',
timezone: 'UTC',
profileVisibility: 'private',
notifications: {
enabled: false,
channels: [],
types: []
}
},
credentials: null // No credentials - system user cannot login
};