Spaces:
Running
Connected2me-style App
Browse filesStack: React Native (Expo) frontend + NestJS backend (TypeScript) + PostgreSQL + TypeORM + Redis (optional for pub/sub) + JWT auth
This document provides a scaffold, feature list, API specification, database schema, and runnable minimal examples for both the Expo app and the NestJS backend. Use this as a starting point to build a production-ready anonymous/chat-link app.
1 β Product Overview
A lightweight anonymous messaging / chat-link app where users can generate shareable links (public or private) that let others send anonymous messages to that user. The app supports optional identity reveal, message moderation (block/report), and real-time messaging using WebSockets.
Key constraints and goals:
Prioritize privacy and minimal user data collection.
Fast, mobile-first UI using Expo.
Simple, maintainable NestJS backend with REST + WebSocket gateway.
2 β Core Features
Account creation (email or continue as guest)
Create multiple anonymous links (short code or UUID)
Send messages to a link (no sender identity required)
Receive messages in-app (push notifications and real-time via WebSockets)
Optional reveal flow: recipient may choose to reveal identity when replying
Block/report messages and links
Basic analytics (message count per link)
Admin tools for moderation (optional)
3 β High-level Architecture
Expo (React Native): screens for Auth, Dashboard (links list), Link view, Message inbox, Message viewer, Settings
NestJS API: authentication (JWT), link management, message ingestion, WebSocket gateway for real-time delivery
Database: PostgreSQL with TypeORM entities for User, Link, Message
Real-time: NestJS WebSocket gateway (ws/socket.io) + optional Redis adapter for multi-instance
Push: Expo push tokens + server logic to deliver notifications
- README.md +8 -5
- components/footer.js +61 -0
- components/navbar.js +81 -0
- create.html +76 -0
- inbox.html +92 -0
- index.html +63 -19
- script.js +33 -0
- style.css +24 -18
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: WhisperLink Vibes π
|
| 3 |
+
colorFrom: blue
|
| 4 |
+
colorTo: green
|
| 5 |
+
emoji: π³
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background: rgba(0, 0, 0, 0.3);
|
| 8 |
+
color: rgba(255, 255, 255, 0.7);
|
| 9 |
+
padding: 2rem 1rem;
|
| 10 |
+
text-align: center;
|
| 11 |
+
margin-top: auto;
|
| 12 |
+
backdrop-filter: blur(5px);
|
| 13 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 14 |
+
}
|
| 15 |
+
.footer-content {
|
| 16 |
+
max-width: 1200px;
|
| 17 |
+
margin: 0 auto;
|
| 18 |
+
display: flex;
|
| 19 |
+
flex-direction: column;
|
| 20 |
+
gap: 1rem;
|
| 21 |
+
}
|
| 22 |
+
.footer-links {
|
| 23 |
+
display: flex;
|
| 24 |
+
justify-content: center;
|
| 25 |
+
gap: 1.5rem;
|
| 26 |
+
margin-bottom: 1rem;
|
| 27 |
+
}
|
| 28 |
+
.footer-links a {
|
| 29 |
+
color: rgba(255, 255, 255, 0.7);
|
| 30 |
+
text-decoration: none;
|
| 31 |
+
transition: color 0.2s;
|
| 32 |
+
}
|
| 33 |
+
.footer-links a:hover {
|
| 34 |
+
color: white;
|
| 35 |
+
}
|
| 36 |
+
.copyright {
|
| 37 |
+
font-size: 0.9rem;
|
| 38 |
+
}
|
| 39 |
+
@media (max-width: 768px) {
|
| 40 |
+
.footer-links {
|
| 41 |
+
flex-direction: column;
|
| 42 |
+
gap: 0.5rem;
|
| 43 |
+
align-items: center;
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
</style>
|
| 47 |
+
<footer>
|
| 48 |
+
<div class="footer-content">
|
| 49 |
+
<div class="footer-links">
|
| 50 |
+
<a href="/privacy.html">Privacy</a>
|
| 51 |
+
<a href="/terms.html">Terms</a>
|
| 52 |
+
<a href="/about.html">About</a>
|
| 53 |
+
<a href="/contact.html">Contact</a>
|
| 54 |
+
</div>
|
| 55 |
+
<p class="copyright">© ${new Date().getFullYear()} WhisperLink Vibes. All rights reserved.</p>
|
| 56 |
+
</div>
|
| 57 |
+
</footer>
|
| 58 |
+
`;
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
customElements.define('custom-footer', CustomFooter);
|
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
background: rgba(0, 0, 0, 0.2);
|
| 8 |
+
backdrop-filter: blur(10px);
|
| 9 |
+
padding: 1rem 2rem;
|
| 10 |
+
display: flex;
|
| 11 |
+
justify-content: space-between;
|
| 12 |
+
align-items: center;
|
| 13 |
+
position: fixed;
|
| 14 |
+
width: 100%;
|
| 15 |
+
top: 0;
|
| 16 |
+
z-index: 1000;
|
| 17 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 18 |
+
}
|
| 19 |
+
.logo {
|
| 20 |
+
color: white;
|
| 21 |
+
font-weight: 700;
|
| 22 |
+
font-size: 1.5rem;
|
| 23 |
+
display: flex;
|
| 24 |
+
align-items: center;
|
| 25 |
+
gap: 0.5rem;
|
| 26 |
+
}
|
| 27 |
+
.nav-links {
|
| 28 |
+
display: flex;
|
| 29 |
+
gap: 1.5rem;
|
| 30 |
+
list-style: none;
|
| 31 |
+
margin: 0;
|
| 32 |
+
padding: 0;
|
| 33 |
+
}
|
| 34 |
+
a {
|
| 35 |
+
color: rgba(255, 255, 255, 0.8);
|
| 36 |
+
text-decoration: none;
|
| 37 |
+
transition: all 0.2s;
|
| 38 |
+
display: flex;
|
| 39 |
+
align-items: center;
|
| 40 |
+
gap: 0.3rem;
|
| 41 |
+
font-weight: 500;
|
| 42 |
+
}
|
| 43 |
+
a:hover {
|
| 44 |
+
color: white;
|
| 45 |
+
transform: translateY(-1px);
|
| 46 |
+
}
|
| 47 |
+
.user-avatar {
|
| 48 |
+
width: 36px;
|
| 49 |
+
height: 36px;
|
| 50 |
+
border-radius: 50%;
|
| 51 |
+
background: rgba(255, 255, 255, 0.2);
|
| 52 |
+
display: flex;
|
| 53 |
+
align-items: center;
|
| 54 |
+
justify-content: center;
|
| 55 |
+
}
|
| 56 |
+
@media (max-width: 768px) {
|
| 57 |
+
nav {
|
| 58 |
+
flex-direction: column;
|
| 59 |
+
padding: 1rem;
|
| 60 |
+
}
|
| 61 |
+
.nav-links {
|
| 62 |
+
margin-top: 1rem;
|
| 63 |
+
gap: 1rem;
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
</style>
|
| 67 |
+
<nav>
|
| 68 |
+
<a href="/" class="logo">
|
| 69 |
+
<i data-feather="message-circle"></i>
|
| 70 |
+
WhisperLink
|
| 71 |
+
</a>
|
| 72 |
+
<ul class="nav-links">
|
| 73 |
+
<li><a href="/create.html"><i data-feather="plus"></i> Create</a></li>
|
| 74 |
+
<li><a href="/inbox.html"><i data-feather="inbox"></i> Inbox</a></li>
|
| 75 |
+
<li><a href="/profile.html"><div class="user-avatar"><i data-feather="user"></i></div></a></li>
|
| 76 |
+
</ul>
|
| 77 |
+
</nav>
|
| 78 |
+
`;
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
customElements.define('custom-navbar', CustomNavbar);
|
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Create Link | WhisperLink</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 12 |
+
</head>
|
| 13 |
+
<body class="bg-gradient-to-br from-indigo-900 to-purple-800 min-h-screen">
|
| 14 |
+
<custom-navbar></custom-navbar>
|
| 15 |
+
|
| 16 |
+
<main class="py-12 px-4 sm:px-6 lg:px-8">
|
| 17 |
+
<div class="max-w-2xl mx-auto bg-white/10 backdrop-blur-md rounded-xl shadow-2xl overflow-hidden fade-in">
|
| 18 |
+
<div class="p-8">
|
| 19 |
+
<h2 class="text-2xl font-bold text-white mb-6 flex items-center gap-2">
|
| 20 |
+
<i data-feather="link"></i>
|
| 21 |
+
Create New Whisper Link
|
| 22 |
+
</h2>
|
| 23 |
+
|
| 24 |
+
<form id="createLinkForm" class="space-y-6">
|
| 25 |
+
<div>
|
| 26 |
+
<label for="linkName" class="block text-sm font-medium text-indigo-100 mb-1">Link Name</label>
|
| 27 |
+
<input type="text" id="linkName" name="linkName"
|
| 28 |
+
class="w-full bg-white/20 border border-white/30 rounded-md px-4 py-2 text-white placeholder-indigo-200 focus:outline-none focus:ring-2 focus:ring-indigo-300">
|
| 29 |
+
<p class="mt-1 text-sm text-indigo-200">This will help you identify the link later</p>
|
| 30 |
+
</div>
|
| 31 |
+
|
| 32 |
+
<div>
|
| 33 |
+
<label class="flex items-center space-x-3">
|
| 34 |
+
<input type="checkbox" name="isPublic" class="form-checkbox h-5 w-5 text-indigo-500 rounded">
|
| 35 |
+
<span class="text-indigo-100">Public Link (appear in directory)</span>
|
| 36 |
+
</label>
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
<div>
|
| 40 |
+
<label for="customSlug" class="block text-sm font-medium text-indigo-100 mb-1">Custom URL (optional)</label>
|
| 41 |
+
<div class="flex">
|
| 42 |
+
<span class="inline-flex items-center px-3 rounded-l-md bg-indigo-700 text-white text-sm">
|
| 43 |
+
whisperlink.me/
|
| 44 |
+
</span>
|
| 45 |
+
<input type="text" id="customSlug" name="customSlug"
|
| 46 |
+
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md bg-white/20 text-white placeholder-indigo-200 focus:outline-none focus:ring-2 focus:ring-indigo-300">
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<div class="pt-4">
|
| 51 |
+
<button type="submit" class="w-full bg-indigo-500 hover:bg-indigo-600 text-white font-medium py-2 px-4 rounded-md transition duration-300 flex items-center justify-center gap-2">
|
| 52 |
+
<i data-feather="plus"></i>
|
| 53 |
+
Create Link
|
| 54 |
+
</button>
|
| 55 |
+
</div>
|
| 56 |
+
</form>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
</main>
|
| 60 |
+
|
| 61 |
+
<custom-footer></custom-footer>
|
| 62 |
+
|
| 63 |
+
<script src="components/navbar.js"></script>
|
| 64 |
+
<script src="components/footer.js"></script>
|
| 65 |
+
<script src="script.js"></script>
|
| 66 |
+
<script>
|
| 67 |
+
feather.replace();
|
| 68 |
+
|
| 69 |
+
document.getElementById('createLinkForm').addEventListener('submit', (e) => {
|
| 70 |
+
e.preventDefault();
|
| 71 |
+
// In a real app, this would make an API call
|
| 72 |
+
alert('Link created successfully!');
|
| 73 |
+
});
|
| 74 |
+
</script>
|
| 75 |
+
</body>
|
| 76 |
+
</html>
|
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Your Inbox | WhisperLink</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 12 |
+
</head>
|
| 13 |
+
<body class="bg-gradient-to-br from-indigo-900 to-purple-800 min-h-screen">
|
| 14 |
+
<custom-navbar></custom-navbar>
|
| 15 |
+
|
| 16 |
+
<main class="py-12 px-4 sm:px-6 lg:px-8">
|
| 17 |
+
<div class="max-w-4xl mx-auto bg-white/10 backdrop-blur-md rounded-xl shadow-2xl overflow-hidden fade-in">
|
| 18 |
+
<div class="p-6 border-b border-white/10">
|
| 19 |
+
<h2 class="text-2xl font-bold text-white flex items-center gap-2">
|
| 20 |
+
<i data-feather="inbox"></i>
|
| 21 |
+
Your Messages
|
| 22 |
+
</h2>
|
| 23 |
+
</div>
|
| 24 |
+
|
| 25 |
+
<div class="divide-y divide-white/10">
|
| 26 |
+
<!-- Sample message item -->
|
| 27 |
+
<div class="p-6 hover:bg-white/5 transition-colors duration-200">
|
| 28 |
+
<div class="flex items-start justify-between">
|
| 29 |
+
<div>
|
| 30 |
+
<h3 class="font-medium text-white">From: Anonymous</h3>
|
| 31 |
+
<p class="text-indigo-100 mt-1">Link: whisperlink.me/yourlink</p>
|
| 32 |
+
</div>
|
| 33 |
+
<span class="text-sm text-indigo-200">2 hours ago</span>
|
| 34 |
+
</div>
|
| 35 |
+
<div class="mt-3">
|
| 36 |
+
<p class="text-white">Hey! Just wanted to say your project is really cool. Keep up the great work!</p>
|
| 37 |
+
</div>
|
| 38 |
+
<div class="mt-4 flex gap-2">
|
| 39 |
+
<button class="text-xs bg-indigo-500 hover:bg-indigo-600 text-white px-3 py-1 rounded-full transition">
|
| 40 |
+
<i data-feather="corner-up-left" class="w-3 h-3 inline mr-1"></i> Reply
|
| 41 |
+
</button>
|
| 42 |
+
<button class="text-xs bg-transparent border border-white/30 hover:bg-white/10 text-white px-3 py-1 rounded-full transition">
|
| 43 |
+
<i data-feather="eye" class="w-3 h-3 inline mr-1"></i> Request ID
|
| 44 |
+
</button>
|
| 45 |
+
<button class="text-xs bg-transparent border border-white/30 hover:bg-white/10 text-white px-3 py-1 rounded-full transition">
|
| 46 |
+
<i data-feather="flag" class="w-3 h-3 inline mr-1"></i> Report
|
| 47 |
+
</button>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<!-- Second message item -->
|
| 52 |
+
<div class="p-6 hover:bg-white/5 transition-colors duration-200">
|
| 53 |
+
<div class="flex items-start justify-between">
|
| 54 |
+
<div>
|
| 55 |
+
<h3 class="font-medium text-white">From: Anonymous</h3>
|
| 56 |
+
<p class="text-indigo-100 mt-1">Link: whisperlink.me/work</p>
|
| 57 |
+
</div>
|
| 58 |
+
<span class="text-sm text-indigo-200">1 day ago</span>
|
| 59 |
+
</div>
|
| 60 |
+
<div class="mt-3">
|
| 61 |
+
<p class="text-white">When will the new feature be ready? We're really excited about it!</p>
|
| 62 |
+
</div>
|
| 63 |
+
<div class="mt-4 flex gap-2">
|
| 64 |
+
<button class="text-xs bg-indigo-500 hover:bg-indigo-600 text-white px-3 py-1 rounded-full transition">
|
| 65 |
+
<i data-feather="corner-up-left" class="w-3 h-3 inline mr-1"></i> Reply
|
| 66 |
+
</button>
|
| 67 |
+
<button class="text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1 rounded-full transition">
|
| 68 |
+
<i data-feather="user-check" class="w-3 h-3 inline mr-1"></i> Identity Revealed
|
| 69 |
+
</button>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<!-- Empty state -->
|
| 74 |
+
<!-- <div class="p-12 text-center text-indigo-200">
|
| 75 |
+
<i data-feather="inbox" class="w-12 h-12 mx-auto mb-4"></i>
|
| 76 |
+
<h3 class="text-xl font-medium mb-2">No messages yet</h3>
|
| 77 |
+
<p>Share your WhisperLink to start receiving anonymous messages</p>
|
| 78 |
+
</div> -->
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
</main>
|
| 82 |
+
|
| 83 |
+
<custom-footer></custom-footer>
|
| 84 |
+
|
| 85 |
+
<script src="components/navbar.js"></script>
|
| 86 |
+
<script src="components/footer.js"></script>
|
| 87 |
+
<script src="script.js"></script>
|
| 88 |
+
<script>
|
| 89 |
+
feather.replace();
|
| 90 |
+
</script>
|
| 91 |
+
</body>
|
| 92 |
+
</html>
|
|
@@ -1,19 +1,63 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>WhisperLink | Anonymous Messaging</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 12 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
| 13 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
|
| 14 |
+
</head>
|
| 15 |
+
<body class="bg-gradient-to-br from-indigo-900 to-purple-800 min-h-screen">
|
| 16 |
+
<custom-navbar></custom-navbar>
|
| 17 |
+
|
| 18 |
+
<main id="vanta-bg" class="py-12 px-4 sm:px-6 lg:px-8">
|
| 19 |
+
<div class="max-w-3xl mx-auto bg-white/10 backdrop-blur-md rounded-xl shadow-2xl overflow-hidden">
|
| 20 |
+
<div class="p-8 text-center">
|
| 21 |
+
<h1 class="text-4xl font-bold text-white mb-4">WhisperLink Vibes</h1>
|
| 22 |
+
<p class="text-xl text-indigo-100 mb-8">Send & receive anonymous messages with style</p>
|
| 23 |
+
|
| 24 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 25 |
+
<a href="/create.html" class="bg-white/20 hover:bg-white/30 transition-all duration-300 rounded-lg p-6 flex flex-col items-center justify-center">
|
| 26 |
+
<i data-feather="link" class="w-12 h-12 text-white mb-3"></i>
|
| 27 |
+
<h3 class="text-white font-semibold text-lg">Create Link</h3>
|
| 28 |
+
<p class="text-indigo-100 text-sm mt-2">Generate your personal whisper link</p>
|
| 29 |
+
</a>
|
| 30 |
+
|
| 31 |
+
<a href="/inbox.html" class="bg-white/20 hover:bg-white/30 transition-all duration-300 rounded-lg p-6 flex flex-col items-center justify-center">
|
| 32 |
+
<i data-feather="inbox" class="w-12 h-12 text-white mb-3"></i>
|
| 33 |
+
<h3 class="text-white font-semibold text-lg">Your Inbox</h3>
|
| 34 |
+
<p class="text-indigo-100 text-sm mt-2">Check anonymous messages</p>
|
| 35 |
+
</a>
|
| 36 |
+
</div>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
</main>
|
| 40 |
+
|
| 41 |
+
<custom-footer></custom-footer>
|
| 42 |
+
|
| 43 |
+
<script src="components/navbar.js"></script>
|
| 44 |
+
<script src="components/footer.js"></script>
|
| 45 |
+
<script src="script.js"></script>
|
| 46 |
+
<script>
|
| 47 |
+
feather.replace();
|
| 48 |
+
VANTA.GLOBE({
|
| 49 |
+
el: "#vanta-bg",
|
| 50 |
+
mouseControls: true,
|
| 51 |
+
touchControls: true,
|
| 52 |
+
gyroControls: false,
|
| 53 |
+
minHeight: 200.00,
|
| 54 |
+
minWidth: 200.00,
|
| 55 |
+
scale: 1.00,
|
| 56 |
+
scaleMobile: 1.00,
|
| 57 |
+
color: 0x7e5bef,
|
| 58 |
+
backgroundColor: 0x0
|
| 59 |
+
});
|
| 60 |
+
</script>
|
| 61 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 62 |
+
</body>
|
| 63 |
+
</html>
|
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
// Shared initialization logic
|
| 3 |
+
console.log('WhisperLink app initialized');
|
| 4 |
+
|
| 5 |
+
// Animation trigger for elements with fade-in class
|
| 6 |
+
const fadeElements = document.querySelectorAll('.fade-in');
|
| 7 |
+
fadeElements.forEach((el, index) => {
|
| 8 |
+
el.style.animationDelay = `${index * 0.1}s`;
|
| 9 |
+
});
|
| 10 |
+
|
| 11 |
+
// WebSocket connection for real-time updates
|
| 12 |
+
const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
|
| 13 |
+
const socket = new WebSocket(protocol + window.location.host + '/ws');
|
| 14 |
+
|
| 15 |
+
socket.onmessage = (event) => {
|
| 16 |
+
const data = JSON.parse(event.data);
|
| 17 |
+
if (data.type === 'new_message') {
|
| 18 |
+
showToast(`New message received in ${data.link}`);
|
| 19 |
+
}
|
| 20 |
+
};
|
| 21 |
+
|
| 22 |
+
function showToast(message) {
|
| 23 |
+
const toast = document.createElement('div');
|
| 24 |
+
toast.className = 'fixed bottom-4 right-4 bg-indigo-600 text-white px-4 py-2 rounded-lg shadow-lg z-50 fade-in';
|
| 25 |
+
toast.textContent = message;
|
| 26 |
+
document.body.appendChild(toast);
|
| 27 |
+
|
| 28 |
+
setTimeout(() => {
|
| 29 |
+
toast.classList.add('opacity-0', 'transition-opacity', 'duration-300');
|
| 30 |
+
setTimeout(() => toast.remove(), 300);
|
| 31 |
+
}, 3000);
|
| 32 |
+
}
|
| 33 |
+
});
|
|
@@ -1,28 +1,34 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', sans-serif;
|
| 5 |
+
min-height: 100vh;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
/* Animation classes */
|
| 9 |
+
.fade-in {
|
| 10 |
+
animation: fadeIn 0.5s ease-in;
|
| 11 |
}
|
| 12 |
|
| 13 |
+
@keyframes fadeIn {
|
| 14 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 15 |
+
to { opacity: 1; transform: translateY(0); }
|
| 16 |
}
|
| 17 |
|
| 18 |
+
/* Custom scrollbar */
|
| 19 |
+
::-webkit-scrollbar {
|
| 20 |
+
width: 8px;
|
|
|
|
|
|
|
| 21 |
}
|
| 22 |
|
| 23 |
+
::-webkit-scrollbar-track {
|
| 24 |
+
background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
+
::-webkit-scrollbar-thumb {
|
| 28 |
+
background: rgba(255, 255, 255, 0.2);
|
| 29 |
+
border-radius: 4px;
|
| 30 |
}
|
| 31 |
+
|
| 32 |
+
::-webkit-scrollbar-thumb:hover {
|
| 33 |
+
background: rgba(255, 255, 255, 0.3);
|
| 34 |
+
}
|