Skip to content

Smartrexs token  #1761

Description

@slater82

Summary

We need a basic backend + front-end integration for the Smartrexs launch website:

  • User registration and login (JWT-based)
  • Wallet connect (MetaMask)
  • Protected dashboard page for logged-in users

Tasks

  • Set up Node/Express backend (smartrexs-backend)
  • Add MongoDB connection and User model
  • Implement /api/auth/register and /api/auth/login routes
  • Add JWT-based auth middleware for protected routes
  • Connect front-end auth.html forms to backend via fetch
  • Store JWT in localStorage and redirect to dashboard.html on login
  • Implement basic dashboard.html that checks for token and displays user email
  • Add MetaMask wallet connect button on index.html (already scaffolded, refine UX)
  • Document environment variables (MONGO_URI, JWT_SECRET, PORT)

Acceptance Criteria

  • A new user can register via auth.html and is stored in MongoDB.
  • A registered user can log in and receive a JWT.
  • Logged-in users can access dashboard.html; non-authenticated users are redirected to auth.html.
  • Wallet connect button works in browsers with MetaMask installed.
  • Code is pushed to GitHub with clear structure:
    • smartrexs-frontend/
    • smartrexs-backend/
  • README explains how to run both frontend and backend locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions