Skip to content

Syntiox/Syntiox-Ideas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Syntiox Ideas

A premium feedback & ideas portal for the Syntiox team

Version Vercel Security License


πŸ“– Overview

Syntiox Ideas is a secure, full-stack feedback collection portal where users can submit ideas, bug reports, feedback, Q&A and general messages to the Syntiox team.

  • 🌐 Frontend β€” Pure HTML, CSS, JavaScript (no frameworks)
  • ⚑ Backend β€” Vercel Serverless Functions (Node.js)
  • πŸ—„οΈ Database β€” MongoDB Atlas (with local file fallback for development)
  • πŸ” Security β€” AES-256-GCM field encryption + JWT authentication

✨ Features

Public Portal (/)

Feature Details
πŸ’‘ Idea Submission Share feature ideas with the team
πŸ› Bug Reports Report bugs with optional screenshots
πŸ’¬ Feedback General product feedback
❓ Q&A Ask questions
πŸ“Œ General Anything else
✈️ Telegram Submit with Telegram username
πŸ’¬ WhatsApp Submit with WhatsApp number
πŸ“ž Phone Submit with phone number
πŸ™ˆ Anonymous Submit without any contact info
πŸ–ΌοΈ Photo Upload Drag & drop screenshots (up to 5MB)

Admin Dashboard (/login.html)

Feature Details
πŸ” Secure Login JWT-based session (8h expiry)
πŸ“Š Stats Cards Count by category at a glance
πŸ” Search Search by name, message, or contact
πŸ—‚οΈ Filter Filter by category
πŸ• Live Clock Real-time date & time display
πŸ–ΌοΈ Photo Lightbox Click photos for full-screen view
πŸ—‘οΈ Delete Remove submissions with confirmation
πŸ”‘ Decryption Contact details shown decrypted (admins only)
⏱️ Auto Logout Automatically logs out after 8 hours

πŸ—‚οΈ Project Structure

syntiox idias/
β”œβ”€β”€ πŸ“„ index.html          # Public feedback portal
β”œβ”€β”€ πŸ“„ login.html          # Admin login page
β”œβ”€β”€ πŸ“„ admin.html          # Admin dashboard
β”œβ”€β”€ 🎨 style.css           # Premium dark glassmorphism CSS
β”œβ”€β”€ βš™οΈ app.js              # Public portal JavaScript
β”œβ”€β”€ βš™οΈ admin-app.js        # Admin dashboard JavaScript
β”œβ”€β”€ πŸ“¦ package.json        # Node.js dependencies
β”œβ”€β”€ β–²  vercel.json         # Vercel routing & build config
β”œβ”€β”€ πŸ”’ .env.example        # Environment variables template
β”œβ”€β”€ 🚫 .gitignore          # Git ignore rules
└── api/
    β”œβ”€β”€ πŸ—„οΈ db.js           # MongoDB + local file fallback
    β”œβ”€β”€ πŸ” crypto.js       # AES-256-GCM encrypt/decrypt
    β”œβ”€β”€ πŸ“¨ submit.js        # POST /api/submit
    β”œβ”€β”€ πŸ”‘ login.js         # POST /api/login
    └── πŸ“‹ submissions.js   # GET + DELETE /api/submissions

πŸš€ Deployment (Vercel)

Option A β€” Vercel Dashboard (Easiest)

  1. Go to vercel.com β†’ Add New Project
  2. Upload the syntiox idias folder
  3. Set Framework Preset to Other
  4. Add Environment Variables (see below)
  5. Click Deploy πŸŽ‰

Option B β€” Vercel CLI

# Install Vercel CLI globally
npm install -g vercel

# Navigate to project folder and deploy
vercel

# For production deployment
vercel --prod

πŸ”‘ Environment Variables

Copy .env.example to .env.local and fill in your values:

# MongoDB Atlas connection string (optional β€” falls back to local file if missing)
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/syntiox

# Admin panel password
ADMIN_PASSWORD=YourStrongPasswordHere!

# JWT signing secret (any long random string, min 32 chars)
JWT_SECRET=your-super-secret-jwt-key-minimum-32-characters

# AES-256 encryption key (MUST be exactly 64 hex characters)
ENCRYPTION_KEY=generate_with_command_below

Generate ENCRYPTION_KEY:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Generate JWT_SECRET:

node -e "console.log(require('crypto').randomBytes(48).toString('base64'))"

⚠️ Never commit .env.local to Git! It's already in .gitignore.


πŸ—„οΈ Database Setup

MongoDB Atlas (Recommended for Production)

  1. Go to mongodb.com/atlas β†’ Create a Free Cluster
  2. Create a database user with a strong password
  3. Whitelist IP 0.0.0.0/0 (for Vercel serverless)
  4. Click Connect β†’ Drivers β†’ copy the connection string
  5. Replace <password> with your password and paste into MONGODB_URI

Local Development (No Setup Needed)

If MONGODB_URI is not set, the app automatically uses a local JSON file (.local-db.json) for storage. Perfect for testing without any cloud setup.


πŸ” Security Architecture

User submits form
       β”‚
       β–Ό
[api/submit.js]
  β”œβ”€β”€ Validates input (server-side)
  β”œβ”€β”€ Encrypts contact info β†’ AES-256-GCM ciphertext
  └── Saves to MongoDB/LocalDB
            β”‚
            β–Ό
      πŸ“¦ Database
      {
        name: "John",
        contactEncrypted: { iv: "...", authTag: "...", data: "..." },  ← πŸ”
        category: "bug",
        message: "...",
        photo: "data:image/png;base64,..."
      }
            β”‚
            β–Ό
[api/submissions.js] (Admin only β€” JWT required)
  β”œβ”€β”€ Verifies JWT token
  β”œβ”€β”€ Decrypts contactEncrypted β†’ plaintext
  └── Returns decrypted data to admin only
Layer Protection
Contact Data AES-256-GCM encryption at rest
Admin Session JWT (HS256, 8h expiry)
Password Direct comparison (serverless-safe)
XSS escapeHtml() on all admin-rendered content
CSRF Stateless JWT β€” no cookies
Photo 5MB limit, image/* type validation

πŸ› οΈ Local Development

# 1. Install Vercel CLI
npm install -g vercel

# 2. Install project dependencies
npm install

# 3. Set up environment variables
copy .env.example .env.local
# Edit .env.local with your values

# 4. Start local dev server (supports Serverless Functions)
vercel dev

Open http://localhost:3000 in your browser.

Default dev credentials (when env vars not set):

  • Admin Password: admin123
  • Encryption: Dev fallback key (not secure β€” set ENCRYPTION_KEY for production!)

πŸ“‘ API Reference

POST /api/submit

Submit user feedback.

Request Body:

{
  "name": "John Doe",
  "contactType": "telegram",
  "contactValue": "@johndoe",
  "category": "idea",
  "message": "It would be great if...",
  "photo": "data:image/png;base64,..." 
}

Categories: idea | bug | feedback | qa | general
Contact Types: telegram | whatsapp | number | none


POST /api/login

Admin login.

Request Body:

{ "password": "your_admin_password" }

Response:

{ "success": true, "token": "eyJ...", "expiresIn": "8h" }

GET /api/submissions

Get all submissions. Requires Authorization: Bearer <token> header.

Query Params: ?category=bug&search=crash&page=1&limit=50


DELETE /api/submissions?id=<id>

Delete a submission. Requires auth header.


🎨 Design System

  • Theme: Dark Glassmorphism
  • Fonts: Inter + Space Grotesk (Google Fonts)
  • Colors: Purple β†’ Blue β†’ Cyan gradient
  • Animations: Floating orbs, fade-in-up, spring transitions
  • Responsive: Mobile-first, works on all screen sizes

πŸ“ License

Private β€” Syntiox Team use only.


Made with ❀️ by the Syntiox Team
All submissions are encrypted and stored securely.

Releases

No releases published

Packages

 
 
 

Contributors