A modern, responsive React web application for fast, secure, and reliable payments.
- Beautiful animated landing page
- 3D logo and interactive UI
- User sign-up and login with validation
- Responsive design for all devices
- React Router navigation
- Custom loading screens and error handling
paybyme/
├── backend/
│ ├── server.js # Main Express server
│ ├── users.json # (Optional) User data storage
│ └── ... # Other backend files
├── frontend/
│ ├── public/ # Static assets (e.g., vite.svg)
│ ├── src/
│ │ ├── assets/ # Images and SVGs
│ │ ├── components/ # React components (login, sign-up, home)
│ │ ├── App.jsx # Main App component
│ │ ├── App.css # App-wide styles
│ │ ├── index.css # Global styles
│ │ └── main.jsx # App entry point
│ ├── package.json # Frontend dependencies and scripts
│ ├── vite.config.js # Vite configuration
│ └── README.md # Frontend documentation
└── README.md # Root project documentation
- Node.js (v18 or newer recommended)
- npm or yarn
- Open a terminal in the
frontenddirectory:cd frontend - Install dependencies:
npm install # or yarn install
Start the development server:
npm run dev
# or
yarn devVisit http://localhost:5173 in your browser.
npm run dev— Start development servernpm run build— Build for productionnpm run preview— Preview production build
- Edit components in
src/components/ - Update styles in
src/App.cssorsrc/index.css - Change assets in
src/assets/orpublic/
The backend provides RESTful API endpoints for user authentication and account management. It is designed to work seamlessly with the PayByMe frontend.
- User registration (
/signup) - User login (
/login) - Password validation and error handling
- CORS support for frontend-backend communication
- Simple in-memory or file-based user storage (customize as needed)
- Open a terminal in the
backenddirectory:cd ../backend - Install dependencies:
npm install
- Start the backend server:
The backend will run on http://localhost:3000 by default.
node server.js
The backend is built with Node.js and Express. It provides /signup and /login endpoints for user authentication, storing user data in a simple file or in-memory array. You can extend it to use a real database and add more features as needed.
Note: This backend is for demo purposes. For production, use hashed passwords, environment variables, and a real database.
- Password Hashing: User passwords should be securely hashed before storage. Use a library like
bcryptto hash passwords during signup and to verify them during login. - JWT Authentication: On successful login, the backend should generate a JSON Web Token (JWT) and return it to the client. The frontend can store this token (e.g., in localStorage) and send it with requests to protected endpoints.
- On signup: Hash the password with
bcryptbefore saving. - On login: Compare the provided password with the stored hash using
bcrypt.compare. - On successful login: Generate a JWT (e.g., with
jsonwebtoken), send it to the client, and require it for protected routes.
Note: For production, always use environment variables for secrets and never store plain text passwords.
MIT
*PayByMe — Secure payments at your fingertips.