A modern online music store with inventory management, shopping cart and admin dashboard
Rythmo is an e-commerce platform designed to sell musical instruments and accessories. Developed with Node.js on the backend and vanilla HTML/CSS/JavaScript on the frontend, it offers a smooth shopping experience with secure authentication, shopping cart, wishlist and payment processing.
- π Intuitive shopping cart with database persistence
- β€οΈ Wishlist to save favorite products
- π Secure authentication with hashed passwords (bcrypt)
- π§ Contact system with email sending
- π³ Multiple payment methods (Card, OXXO, Transfer)
- π« PDF invoice generation
- π‘οΈ CAPTCHA anti-bot on forms
- π Complete admin panel
- π Multi-currency support and multiple countries
|
|
| Home | Catalog | Product Details |
|---|---|---|
![]() |
![]() |
![]() |
| Shopping Cart | Checkout | Payment |
|---|---|---|
![]() |
![]() |
![]() |
| Login | Admin Dashboard |
|---|---|
![]() |
![]() |
Make sure you have the following installed:
| Requirement | Version | Download |
|---|---|---|
| Node.js | 18+ | Download |
| MySQL | 8.0+ | Download |
| Git | Latest | Download |
# Clone the repository
git clone https://github.com/cesarMalanco/Rythmo.git
cd rythmo
# Install backend dependencies
cd BACKEND
npm install
# Create .env file (see configuration section)
cp .env.example .env
# Return to root
cd ..Create a .env file in the BACKEND folder:
# Server
PORT=3000
NODE_ENV=development
# Database
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=
DB_NAME=rythmo
# JWT Authentication
JWT_SECRET=your_secret_key_here
# Email (Nodemailer)
EMAIL_SERVICE=gmail
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
EMAIL_FROM=noreply@rythmo.com
# General Configuration
APP_URL=http://localhost:3000
ADMIN_EMAIL=admin@rythmo.com
β οΈ Important: ChangeJWT_SECRETto a secure key. For Gmail, use app passwords.
Your database needs the following tables:
Main tables:
users- User informationproducts- Product catalogcart- Shopping cart itemsorders- Completed orderswishlist- Saved itemscoupons- Discount codessubscriptions- User subscriptionscountries- Shipping countriescaptcha_sessions- CAPTCHA sessions
Option 1: SQL Script (Recommended)
If you have a database.sql file:
# From command line
mysql -u root -p rythmo < database/database.sqlOption 2: phpMyAdmin
- Open phpMyAdmin (http://localhost/phpmyadmin)
- Create a new database called
rythmo - Select the database
- Go to "Import" and upload the SQL file
Option 3: MySQL Workbench
- Open MySQL Workbench
- Connect to your server
- File β Open SQL Script
- Open the database file
- Execute the script
cd BACKEND
# Development (with nodemon)
npm run dev
# Production
npm startThe server will be available at http://localhost:3000
# Open index.html in your browser or use a local server
# Option 1: Live Server (VS Code)
# Right-click index.html β Open with Live Server
# Option 2: Python
python -m http.server 8000
# Option 3: Node.js
npx http-server FRONTEND| Technology | Purpose | Version |
|---|---|---|
| JavaScript Runtime | 18+ | |
| Backend Framework | 4.18+ | |
| Database | 8.0+ | |
| Authentication | - | |
| Secure Hashing | 6.0+ |
{
"bcrypt": "^6.0.0", // Secure password hashing
"cors": "^2.8.5", // CORS middleware
"dotenv": "^17.2.3", // Environment variables
"express": "^5.2.1", // Web framework
"jsonwebtoken": "^9.0.2", // JWT authentication
"multer": "^2.0.2", // File uploads
"mysql2": "^3.15.3", // MySQL driver
"nodemailer": "^7.0.10", // Email sending
"pdfkit": "^0.15.2", // PDF generation
"svg-captcha": "^1.4.0", // Anti-bot CAPTCHA
"validator": "^13.15.23" // Data validation
}rythmo/
β
βββ BACKEND/
β βββ server.js # Server entry point
β βββ hashAdmin.js # Password hashing utility
β βββ package.json # Dependencies
β β
β βββ config/
β β βββ database.js # MySQL connection pool
β β βββ email.js # Nodemailer configuration
β β
β βββ models/
β β βββ User.js # User model
β β βββ Product.js # Product model
β β βββ Order.js # Order model
β β βββ Cart.js # Cart model
β β βββ Wishlist.js # Wishlist model
β β βββ Coupon.js # Coupon model
β β βββ Country.js # Country model
β β βββ Subscription.js # Subscription model
β β βββ CaptchaSession.js # CAPTCHA session model
β β βββ ...
β β
β βββ controllers/
β β βββ authController.js # Authentication logic
β β βββ productsController.js # Product management
β β βββ cartController.js # Cart management
β β βββ ordersController.js # Order management
β β βββ checkoutController.js # Payment processing
β β βββ wishlistController.js # Wishlist management
β β βββ ...
β β
β βββ routes/
β β βββ authRoutes.js # Authentication routes
β β βββ productRoutes.js # Product routes
β β βββ cartRoutes.js # Cart routes
β β βββ orderRoutes.js # Order routes
β β βββ ...
β β
β βββ middlewares/
β β βββ authMiddleware.js # JWT verification
β β βββ corsMiddleware.js # CORS configuration
β β
β βββ services/
β β βββ captchaService.js # CAPTCHA service
β β
β βββ uploads/
β β βββ invoices/ # PDF invoices folder
β β
β βββ .env.example # Environment variables example
β
βββ FRONTEND/
β βββ PAGES/
β β βββ index.html # Home page
β β βββ catalogo.html # Product catalog
β β βββ cart.html # Shopping cart
β β βββ checkout.html # Checkout page
β β βββ login.html # Login page
β β βββ register.html # Register page
β β βββ contact.html # Contact form
β β βββ paymentCard.html # Card payment
β β βββ paymentOXXO.html # OXXO payment
β β βββ transfer.html # Transfer payment
β β βββ adminDashboard.html # Admin panel
β β βββ address.html # Address management
β β βββ wishlist.html # Wishlist
β β βββ faq.html # FAQ
β β βββ nosotros.html # About us
β β βββ resetpassword.html # Password recovery
β β βββ ...
β β
β βββ CSS/
β β βββ indexStyles.css
β β βββ catalogoStyles.css
β β βββ cartStyles.css
β β βββ loginStyles.css
β β βββ adminStyles.css
β β βββ ...
β β
β βββ JS/
β β βββ acces_script.js # General authentication
β β βββ login_script.js # Login logic
β β βββ cart_script.js # Cart management
β β βββ checkout_script.js # Checkout logic
β β βββ admin_script.js # Admin panel
β β βββ currencyUtils.js # Currency utilities
β β βββ ...
β β
β βββ IMAGES/
β βββ (Product images)
β
βββ README.md
POST /api/auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "MyPassword123",
"name": "John Doe"
}POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "MyPassword123"
}
// Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 1,
"email": "user@example.com",
"name": "John Doe"
}
}// Send in headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...The system includes a contact form that sends emails directly to your inbox. Make sure to configure the email variables correctly in .env.
Solution:
- Verify that MySQL is running
- Check credentials in
.env - Ensure the database
rythmoexists
Solution:
- Verify that
corsMiddleware.jsis configured correctly - Ensure frontend and backend are on correct ports
Solution:
- Clear browser localStorage
- Try logging in again
- Verify that
JWT_SECRETis the same in backend
Solution:
- Verify Gmail credentials in
.env - Use app passwords, not normal password
- Enable less secure app access in Gmail
# Backend
cd BACKEND
npm start # Run in production
npm run dev # Run with nodemon (development)
# Frontend
npm start # If configured# Install Heroku CLI
npm install -g heroku
# Login
heroku login
# Create app
heroku create your-app-rythmo
# Set environment variables
heroku config:set DB_HOST=your-host
heroku config:set DB_USER=your-user
# ... etc
# Deploy
git push heroku mainCheck the platform's documentation to deploy Node.js applications.
This project is licensed under the MIT License - see the LICENSE file for details.
- Danna Castro - Lead Developer
- Isabel Alvarado - Frontend Designer
- CΓ©sar Malanco - Backend Developer
- Fernanda Uribe - Project Manager
Built with β€οΈ using Node.js and JavaScript







