businessCard/LOCAL_CONFIG_SETUP.md

85 lines
2.8 KiB
Markdown

# Local Configuration Setup
This project supports local configuration for your business card data without committing it to git.
## How to Use Local Configuration
### 1. Copy the Example File
Copy `src/config/businessCard.config.local.example.ts` and rename it to `src/config/businessCard.config.local.ts`:
```bash
cp src/config/businessCard.config.local.example.ts src/config/businessCard.config.local.ts
```
### 2. Edit Your Local Config
Open `src/config/businessCard.config.local.ts` and update all the fields with your information:
```typescript
export const localBusinessCard: BusinessCard = {
name: 'Your Name',
title: 'Your Job Title',
company: 'Your Company Name',
email: 'your.email@example.com',
phone: '+1 (555) 000-0000',
website: 'https://yourwebsite.com',
image: 'https://your-image-url.com/photo.jpg',
bio: 'Your professional bio goes here.',
socialLinks: [
{
platform: 'LinkedIn',
url: 'https://linkedin.com/in/yourprofile',
icon: 'Linkedin',
},
{
platform: 'Twitter',
url: 'https://twitter.com/yourhandle',
icon: 'Twitter',
},
{
platform: 'GitHub',
url: 'https://github.com/yourprofile',
icon: 'Github',
},
{ platform: 'Portfolio', url: 'https://yourwebsite.com', icon: 'Globe' },
],
}
```
### 3. No Additional Configuration Needed
The app will automatically detect and load your local config when it starts. No need to modify any other files!
## How It Works
- **Default Config**: `src/config/businessCard.config.ts` contains default demo data and **IS tracked by git**
- **Local Config**: `src/config/businessCard.config.local.ts` is created by you and **is NOT tracked by git** (added to `.gitignore`)
- **On Startup**: The app tries to load your local config; if not found, it falls back to the default
- **Your Data is Safe**: All your personal information stays local and never gets pushed to git
## File Structure
```
src/config/
├── businessCard.config.ts # Default config (git-tracked)
├── businessCard.config.local.example.ts # Template for you to copy
└── businessCard.config.local.ts # Your local config (git-ignored) ← Create this!
```
## Tips
- **Image URLs**: Use absolute URLs (https://...) for profile images
- **Phone Format**: Any format works - the phone number becomes a clickable tel: link
- **Social Icons**: Use the icon names from lucide-react:
- `Linkedin`, `Twitter`, `Github`, `Globe`, `Mail`, `Phone`
- **Testing Locally**: `npm run dev` will load your local config automatically
## Git Safety
The `.gitignore` file already includes `*.local` entries, so:
- ✅ Your `businessCard.config.local.ts` will NEVER be committed
- ✅ Only `businessCard.config.ts` (with demo data) is tracked by git
- ✅ You can safely add personal/sensitive information to your local config