Music Sheet Application
This is a music sheet/songbook management application built with Node.js, Express, and MongoDB. It allows users to create, manage, and view songbooks with lyrics, particularly focused on Khmer (Cambodian) songs with custom font support.
Music Sheet Application
Overview
This is a music sheet/songbook management application built with Node.js, Express, and MongoDB. It allows users to create, manage, and view songbooks with lyrics, particularly focused on Khmer (Cambodian) songs with custom font support.
Project Structure
- app.js: Main Express application configuration
- bin/www: Server startup script (configured for port 5000)
- models/: Mongoose data models
user.js: User authentication model with Passport.jssongbook.js: Songbook metadata modelsonglists.js: Song list model
- routes/: Express route handlers
index.js: Main routesbooks.js: Songbook management routessongs.js: Song management routesusers.js: User authentication routes
- views/: EJS templates for frontend
- public/: Static assets (CSS, JavaScript, fonts, images)
- uploads/: User-uploaded images for songs/books
Technology Stack
- Backend: Node.js 16.x with Express.js
- Database: MongoDB (Mongoose ODM)
- Authentication: Passport.js with Local Strategy
- Template Engine: EJS
- File Uploads: Multer
- Session Management: Cookie-session
Configuration
Environment Variables
DATABASEURL: MongoDB connection string (required)SESSION_SECRET: Secret key for session encryption (recommended for production)PORT: Server port (defaults to 5000 for Replit compatibility)
Current Setup Status
- ✅ Server configured to run on port 5000
- ✅ Server configured to bind to 0.0.0.0 for Replit proxy
- ✅ All dependencies installed
- ✅ MongoDB connection configured and working
- ✅ Application running successfully
- ✅ Deployment configured for autoscale
Database Setup
Setup Complete
The application is now connected to a working MongoDB database via the DATABASEURL environment variable.
Connection Features
- Automatic connection validation on startup
- Clear error messages if connection fails
- Helpful troubleshooting guidance in logs
If You Need to Change Database
Option 1: MongoDB Atlas (Recommended - Free)
- Go to https://www.mongodb.com/cloud/atlas
- Create a free account and cluster (M0 tier)
- Get connection string: Connect → Connect your application
- Update DATABASEURL secret in Replit with the new connection string
- Format:
mongodb+srv://username:password@cluster.mongodb.net/database?retryWrites=true&w=majority
Option 2: Alternative MongoDB Service
- Any MongoDB-compatible service will work
- Update DATABASEURL with your connection string
Option 3: Migrate to PostgreSQL
- Replit provides a built-in PostgreSQL database
- Would require converting Mongoose models to PostgreSQL (Sequelize/Prisma)
- Significant code changes needed
Running the Application
Development
The workflow is already configured. Once a valid DATABASEURL is set:
- The server will automatically restart
- Access the application through the Replit webview
- Server runs on port 5000
Deployment
Deployment configuration will be set up once the application runs successfully.
Features
- User authentication (signup/login)
- Role-based access (admin/operator)
- Songbook creation and management
- Song lyrics with custom Khmer fonts
- Image upload for book covers
- Search functionality
- Responsive design
Next Steps
- ✅ Install dependencies:
npm install(completed) - ✅ Configure server for Replit (completed)
- ✅ Set up valid MongoDB connection (completed)
- ✅ Test application functionality (completed)
- ✅ Configure deployment settings (completed)
Setup Complete! The application is ready to use and deploy.
Recent Changes (October 13, 2025)
- Imported project from GitHub
- Updated server to use port 5000 (Replit requirement)
- Changed server binding to 0.0.0.0 for Replit proxy compatibility
- Installed all npm dependencies
- Added MongoDB connection validation and error handling
- Configured deployment for autoscale
- Verified application functionality with screenshot testing
- Created comprehensive project documentation
Related Documents
GOOBY - Closing Store Marketplace
A marketplace platform for discovering and purchasing inventory from closing retail stores, focused on the NY, NJ, CT, and PA areas.
Lua Code Obfuscator/Deobfuscator
This is a full-stack web application that provides Lua code obfuscation and deobfuscation services specifically designed for Roblox scripts. The application features a professional Monaco code editor with dual-pane interface, comprehensive obfuscation settings, and file upload/download functionality. Built with a modern React frontend and Node.js/Express backend.
GREEN NODE - Project Overview
Full-stack recycling platform connecting waste generators with verified collectors in Cochabamba, Bolivia.
ADN Systems DMR Peer Server
ADN Systems DMR Peer Server is a fork of FreeDMR, implementing a Digital Mobile Radio (DMR) network server. Launched in April 2024 by international amateur radio enthusiasts, it operates on an Open Bridge Protocol (OBP) fostering a decentralized network architecture. The system handles DMR voice and data communication, acting as a conference bridge/reflector that routes traffic between connected systems (repeaters, hotspots, peers) based on configurable bridge rules.