Absolutely! Here’s a step-by-step guide and a simple HTML prototype to get you started.
Step-by-Step Guide
-
Choose Your Stack
For a web-based prototype, you can use:
- Frontend: HTML, CSS, JavaScript
- Map: Google Maps JavaScript API or Leaflet.js (free, open-source)
- Backend (optional for prototype): You can use mock data for now.
-
Core Features for Prototype
- Map showing user locations
- User cards with info (name, age, bio)
- Click on a map marker to see user info
-
How It Works
- The map loads with some sample users.
- Clicking a marker shows a popup with user info.
- No login, chat, or real backend for this prototype.
HTML Prototype (with Leaflet.js)
This is a very basic prototype. You can run this as a single HTML file.
Note: This uses Leaflet.js and OpenStreetMap (no API key needed).
<!DOCTYPE html>
<html>
<head>
<title>Smoke Mates Finder Prototype</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<style>
body { margin:0; padding:0; font-family: Arial, sans-serif; }
#map { height: 90vh; width: 100vw; }
.leaflet-popup-content { font-size: 16px; }
.user-card { margin: 0; }
.user-card img { width: 60px; height: 60px; border-radius: 50%; }
.user-card h3 { margin: 5px 0 0 0; }
.user-card p { margin: 2px 0; }
</style>
</head>
<body>
<h2 style="text-align:center;">Smoke Mates Finder (Prototype)</h2>
<div id="map"></div>
<!-- Leaflet JS -->
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script>
// Sample users
const users = [
{
name: "Alex",
age: 25,
bio: "Looking for a chill smoke mate in the park.",
lat: 40.7128,
lng: -74.0060,
photo: "https://randomuser.me/api/portraits/men/32.jpg"
},
{
name: "Sam",
age: 29,
bio: "Love to chat and smoke after work.",
lat: 40.7138,
lng: -74.0010,
photo: "https://randomuser.me/api/portraits/men/45.jpg"
},
{
name: "Jess",
age: 22,
bio: "New in town, looking for friends to smoke with.",
lat: 40.7108,
lng: -74.0080,
photo: "https://randomuser.me/api/portraits/women/65.jpg"
}
];
// Initialize map
const map = L.map('map').setView([40.7128, -74.0060], 14);
// Add OpenStreetMap tiles
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
// Add user markers
users.forEach(user => {
const marker = L.marker([user.lat, user.lng]).addTo(map);
marker.bindPopup(`
<div class="user-card">
<img src="${user.photo}" alt="${user.name}" />
<h3>${user.name}, ${user.age}</h3>
<p>${user.bio}</p>
</div>
`);
});
</script>
</body>
</html>
How to Use This Prototype
- Copy the code above into a file named
index.html.
- Open it in your browser.
- You’ll see a map with sample users. Click on a marker to see their info.
Next Steps
- Add real user authentication (Firebase Auth, etc.)
- Store user data in a database (Firebase, MongoDB, etc.)
- Add chat/messaging (Socket.io, Firebase, etc.)
- Deploy as a PWA for mobile experience
If you want to expand this prototype (add login, real-time updates, etc.), let me know!