Skip to content

Instantly share code, notes, and snippets.

@tq-bit
Created January 3, 2025 20:39
Show Gist options
  • Save tq-bit/d3887ac3bd6f54b8f6a58e5cd19063d9 to your computer and use it in GitHub Desktop.
Save tq-bit/d3887ac3bd6f54b8f6a58e5cd19063d9 to your computer and use it in GitHub Desktop.
Function to create a static user with a dynamic ID
const o = (i) => ({
id: i,
personalInfo: {
firstName: "John",
lastName: "Doe",
dateOfBirth: "1995-03-15",
age: 30,
ssn: "123-45-6789",
gender: "Male",
maritalStatus: "Married",
nationality: "USA",
languages: ["English", "Spanish", "French", "German", "Mandarin"],
profilePicture: "https://example.com/profile/johndoe.jpg",
bio: "Passionate software engineer with over 10 years of experience in developing scalable applications. Enthusiast for new technologies and problem-solving.",
hobbies: ["Reading", "Cycling", "Gaming", "Traveling", "Photography"],
socialMediaLinks: {
linkedin: "https://linkedin.com/in/johndoe",
twitter: "https://twitter.com/johndoe",
github: "https://github.com/johndoe"
}
},
contactInfo: {
email: "[email protected]",
phone: {
primary: "+1 (555) 123-4567",
secondary: "+1 (555) 987-6543",
emergency: "+1 (555) 246-8135",
international: "+44 20 7946 0958"
},
address: {
street: "123 Main Street",
unit: "Apt 4B",
city: "Anytown",
state: "CA",
zip: "12345",
country: "USA",
coordinates: {
latitude: 37.7749,
longitude: -122.4194
},
previousAddresses: [{
street: "456 Oak Avenue",
unit: "Apt 2A",
city: "Oldtown",
state: "CA",
zip: "67890",
country: "USA"
}, {
street: "789 Pine Street",
unit: "Unit 5",
city: "Greenville",
state: "TX",
zip: "11223",
country: "USA"
}]
}
},
employment: {
status: "Employed",
position: "Senior Software Engineer",
department: "Engineering",
company: "Tech Solutions Inc.",
startDate: "2020-06-15",
salary: 120000,
bonus: 5000,
stockOptions: 200,
benefits: ["Health Insurance", "401k", "Stock Options", "Dental", "Vision", "Paid Time Off"],
workLocation: "San Francisco, CA",
remoteOption: true,
manager: {
name: "Jane Smith",
id: "MGR-789",
email: "[email protected]",
phone: "+1 (555) 234-5678",
officeAddress: "Tech Solutions Inc., 123 Tech Avenue, San Francisco, CA"
},
coworkers: [{
name: "Alice Johnson",
position: "Product Manager",
email: "[email protected]"
}, {
name: "Bob Miller",
position: "Software Developer",
email: "[email protected]"
}]
},
education: [{
degree: "Master of Science",
field: "Computer Science",
institution: "Stanford University",
graduationYear: 2018,
gpa: 3.8,
honors: ["Magna Cum Laude", "Dean's List"],
relevantCourses: ["Advanced Algorithms", "Machine Learning", "Cloud Computing"]
}, {
degree: "Bachelor of Science",
field: "Software Engineering",
institution: "MIT",
graduationYear: 2016,
gpa: 3.9,
honors: ["Summa Cum Laude"],
relevantCourses: ["Data Structures", "Web Development", "Operating Systems"]
}],
healthInfo: {
bloodType: "O+",
allergies: ["Peanuts", "Penicillin", "Dust Mites"],
medications: [{
name: "Vitamin D",
dosage: "2000 IU",
frequency: "Daily"
}, {
name: "Ibuprofen",
dosage: "400 mg",
frequency: "As needed"
}],
height: {
cm: 180,
feet: 5,
inches: 11
},
weight: {
kg: 75,
lbs: 165
},
medicalConditions: ["Asthma", "Seasonal Allergies"],
doctor: {
name: "Dr. Samantha Lee",
contact: "+1 (555) 321-7654",
clinic: "Health First Clinic, 101 Wellness Blvd, Anytown, CA"
}
},
financialInfo: {
bankAccounts: [{
type: "Checking",
accountNumber: "****4567",
balance: 15000.00,
bank: "Chase",
accountType: "Personal"
}, {
type: "Savings",
accountNumber: "****7890",
balance: 50000.00,
bank: "Wells Fargo",
accountType: "Personal"
}, {
type: "Business Checking",
accountNumber: "****2345",
balance: 25000.00,
bank: "Bank of America",
accountType: "Business"
}],
creditScore: 785,
investments: {
stocks: 75000.00,
bonds: 25000.00,
crypto: 10000.00,
realEstate: 150000.00,
mutualFunds: 20000.00
},
expenses: [{
category: "Mortgage",
amount: 1200.00,
frequency: "Monthly"
}, {
category: "Utilities",
amount: 300.00,
frequency: "Monthly"
}, {
category: "Groceries",
amount: 500.00,
frequency: "Monthly"
}],
incomeSources: [{
type: "Salary",
amount: 120000.00,
frequency: "Annual"
}, {
type: "Freelance",
amount: 15000.00,
frequency: "Quarterly"
}]
},
preferences: {
theme: "Dark",
notifications: {
email: true,
sms: true,
push: false,
news: true
},
communication: {
preferredMethod: "email",
frequency: "weekly",
subscriptions: ["Newsletter", "Product Updates", "Security Alerts", "Tech News"]
},
appSettings: {
language: "English",
timeZone: "PST",
currency: "USD"
}
},
metadata: {
createdAt: "2025-01-03T21:33:59+01:00",
lastModified: "2025-01-03T21:33:59+01:00",
version: "2.0.0",
source: "System",
status: "Active",
createdBy: "System Admin",
updatedBy: "John Doe",
accessLog: [{
timestamp: "2025-01-03T22:00:00+01:00",
action: "Profile Updated",
performedBy: "John Doe"
}, {
timestamp: "2025-01-02T10:15:30+01:00",
action: "Login",
performedBy: "John Doe"
}]
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment