My portfolio to connect with others through stamps.
- Interactive Stamping System: Visitors anonymously place stamps on my portfolio
- Role-Based Identity: Users can select their role (PM, Engineer, Leadership, etc.) when placing stamps
- Real-time Updates: See stamps from others in real-time
- Time-based Icons: Sun/moon icons shown on stamps depending when the time it was placed
- Responsive Design: Works on desktop and mobile devices
- Authentication: Password-protected
Before you begin, install the following:
- Node.js (version 18 or higher)
- npm (comes with Node.js)
- Docker (optional, for containerized development)
- Docker Compose (optional, for containerized development)
-
Clone the repository:
git clone https://github.com/danapixels/portfolio.git cd portfolio -
Start the dev environment:
docker-compose -f docker-compose.dev.yml up --build
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
The project includes a env.dev file with development settings:
NODE_ENV=development
VITE_API_URL=http://localhost:3001
ADMIN_KEY=dev-secret-key #unset by default
PORT=3001
VITE_DEV_SERVER_PORT=3000For production deployment, create a .env file with:
NODE_ENV=production
VITE_API_URL=https://your-domain.com/api
ADMIN_KEY=your-secure-admin-key #unset by default
PORT=3001
JWT_SECRET=your-jwt-secret
PASSWORD_HASH=your-bcrypt-password-hashportfolio/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Dock.tsx # Stamp dock
│ │ │ ├── StampingArea.tsx # Where stamps are placed
│ │ │ ├── ToggleSwitch.tsx # Toggle
│ │ │ └── types.ts # TypeScript type definitions
│ │ ├── App.tsx # Main app component
│ │ ├── About.tsx # About page
│ │ ├── Password.tsx # Authentication page
│ │ └── index.css # Global styles
│ ├── public/ # Static assets
│ └── package.json # Frontend dependencies
├── server/ # Node.js backend
│ ├── server.js # Express server
│ ├── stamps.json # Stamp data storage
│ └── package.json # Backend dependencies
├── docker-compose.dev.yml # Docker development setup
├── Dockerfile.dev # Development Docker configuration
└── README.md # This file
- Navigate to the portfolio website
- You'll be redirected to the password page
- Enter the correct password to access the main portfolio
- Optionally select your role identity before logging in
- Select a Role: Click the role selector in the dock to choose your role if you haven't already
- Choose a Stamp: Select from the stamps
- Place Stamps: Click anywhere on the page to place a stamp
- View Others: See stamps from other visitors with their role and timestamp
- Clear Stamps: Use the trash icon to clear your own stamps
- About Page: Short snippet about me
- Toggle Switch: Switch between work and personal projects
- Social Links: GitHub, LinkedIn, and email links
POST /api/auth/login- User authenticationPOST /api/auth/logout- User logoutGET /api/auth/verify- Verify authentication status
GET /api/stamps- Get all stampsPOST /api/stamps- Create a new stampPOST /api/stamps/clear- Clear user's stampsDELETE /api/stamps- Admin: clear all stamps
- Update the
UserIdentitytype inclient/src/components/types.ts - Add the role icon in
client/src/components/StampingArea.tsxin thegetIconForIdentityfunction - Add the role option in
client/src/components/IdentityChips.tsx
- Update the
StampTypetype inclient/src/components/types.ts - Add the stamp icon in
client/src/components/stampIcons.tsx - Update the dock items in
client/src/components/StampingArea.tsx
The project uses Tailwind CSS for styling. Key files:
client/src/index.css- Global styles and custom cursorsclient/src/components/Dock.css- Dock-specific styles- Component files contain Tailwind classes for styling
The default password is password unless you change it.
-
Generate a new password hash:
# Using Node.js crypto node -e "const crypto = require('crypto'); console.log(crypto.createHash('sha256').update('your-new-password').digest('hex'));"
-
Set the environment variable:
# Development (create or update env.dev) echo "PASSWORD_HASH=$(node -e \"const crypto = require('crypto'); console.log(crypto.createHash('sha256').update('your-new-password').digest('hex'));\")" >> env.dev
Or for production:
# Production environment export PASSWORD_HASH=$(node -e "const crypto = require('crypto'); console.log(crypto.createHash('sha256').update('your-new-password').digest('hex'));")
-
Authentication issues:
- Check that the password hash in environment variables matches your password
- Verify JWT secret is set correctly
-
Stamps not loading:
- Check that
server/stamps.jsonexists and is writable - Verify API endpoints are accessible
- Check that
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Download the Digi font here!
This project is licensed under GPL 3.0 License.