A customizable link-sharing landing page with admin panel for managing links and theme settings.
- Install dependencies:
npm install- Run the setup script to initialize data files and create admin credentials:
npm run setupThe setup script will:
- Create the
data/directory if it doesn't exist - Generate
links.jsonwith sample links (GitHub, Twitter, LinkedIn) - Generate
theme.jsonwith default theme settings - Generate
profile.jsonwith default profile information - Prompt you to create admin credentials (default: username=admin, password=admin123)
- Prompt you to configure The Noun Project API credentials (optional)
- Generate
config.jsonfor API configuration
The Noun Project API Setup (Optional)
During setup, you'll be prompted to enter API credentials for The Noun Project. This enables icon selection features in the admin panel.
To get API credentials:
- Visit https://thenounproject.com/developers/
- Create an account or sign in
- Create a new app to get your API key and secret
- Enter these credentials when prompted during setup
You can skip this step and configure it later from the admin panel if needed.
- Start the server:
npm startThe server will run on http://localhost:3000 by default.
For development with auto-reload (if nodemon is installed):
npm run dev- Landing Page: http://localhost:3000
- Admin Login: http://localhost:3000/login.html
- Admin Panel: http://localhost:3000/admin.html (requires authentication)
If you used the default values during setup:
- Username:
admin - Password:
admin123
Important: Change these credentials in production by running the setup script again or manually updating the data/auth.json file with a bcrypt-hashed password.
server/- Backend Express serverroutes/- API route handlersmiddleware/- Authentication middlewareutils/- Utility functions (storage operations)
public/- Frontend HTML, CSS, and JavaScriptindex.html- Public landing pagelogin.html- Admin login pageadmin.html- Admin control panelcss/- Stylesheetsjs/- Client-side JavaScript
data/- JSON data files for persistencelinks.json- Link collection datatheme.json- Theme customization settingsauth.json- Admin credentials (bcrypt hashed)profile.json- Profile photo and bio informationconfig.json- API keys and configuration settings
- Responsive design that works on mobile, tablet, and desktop
- Customizable theme with colors and background images
- Loading states for better user experience
- Error handling with user-friendly messages
- Accessibility features (ARIA labels, keyboard navigation, high contrast support)
- Reduced motion support for users with motion sensitivity
- Secure session-based authentication
- Link management (add, edit, delete)
- Drag-and-drop link reordering with visual feedback
- Theme customization with live color pickers
- Loading states for all async operations
- Comprehensive error handling with timeout protection
- Automatic session validation and redirect
- User-friendly error messages
- Network timeout protection (10-second timeout on requests)
- Graceful error recovery with user-friendly messages
- Loading indicators for all async operations
- Form validation with clear error messages
- Automatic redirect to login on authentication failure
- Session persistence across page refreshes
- Responsive design tested on various screen sizes
You can configure the application using environment variables:
PORT- Server port (default: 3000)SESSION_SECRET- Secret key for session encryption (default: auto-generated, but should be set in production)
Example:
PORT=8080 SESSION_SECRET=your-secret-key npm startIf you need to add or update The Noun Project API credentials after initial setup:
-
Option 1: Through Admin Panel (when implemented)
- Log in to the admin panel
- Navigate to the configuration section
- Enter your API key and secret
-
Option 2: Manual Configuration
- Edit
data/config.jsondirectly - Add your
nounProjectApiKeyandnounProjectApiSecret - Restart the server
- Edit
-
Option 3: Re-run Setup
- Run
npm run setupagain - This will recreate all data files (backup existing data first!)
- Run
The data/ directory contains all your links, theme settings, credentials, and API keys. Make sure to:
- Back up this directory regularly
- Keep
auth.jsonandconfig.jsonsecure and never commit them to version control - Add
data/to your.gitignorefile in production
- Always change default credentials in production
- Use HTTPS in production environments
- Set a strong
SESSION_SECRETenvironment variable - Regularly back up your data files
- Rate limiting is implemented on the login endpoint (5 attempts per 15 minutes)
- All user inputs are validated and sanitized
- XSS protection through HTML escaping
- Session cookies are HTTP-only and secure in production
The application is tested and works on:
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
The application is fully responsive with breakpoints at:
- Mobile: < 480px
- Tablet: 480px - 768px
- Desktop: > 768px
All features work seamlessly across all screen sizes.
The application follows WCAG 2.1 guidelines:
- Semantic HTML structure
- ARIA labels for screen readers
- Keyboard navigation support
- High contrast mode support
- Reduced motion support for animations
- Proper focus management
- Color contrast ratios meet AA standards
- Check if port 3000 is already in use
- Try setting a different port:
PORT=8080 npm start
- Verify credentials in
data/auth.json - Check browser console for errors
- Clear browser cookies and try again
- Check server is running
- Verify
data/links.jsonexists and is valid JSON - Check browser console for network errors
- Verify
data/theme.jsonexists and is valid JSON - Check browser console for errors
- Try refreshing the page with Ctrl+F5 (hard refresh)