npm run install-all
Start the application:
Option 1 - Using the batch file (Windows):
start-all.bat
Option 2 - Using PowerShell (Windows):
.\start-all.ps1
Option 3 - Using npm (Cross-platform):
npm start
If you see connection errors:
localhost instead of 127.0.0.1 in your browserA modern web application for creating and collaborating on forms in real-time with integrated video chat functionality.
FormSync/
βββ public/ # Frontend static files
β βββ index.html # Main HTML file
β βββ css/ # Stylesheets
β β βββ main.css # Main styles
β β βββ components.css # Component styles
β β βββ animations.css # Animations
β βββ js/ # JavaScript files
β β βββ app.js # Main app entry
β β βββ components/ # UI components
β β βββ services/ # Services (API, Socket, etc)
β β βββ utils/ # Utility functions
β βββ assets/ # Images, fonts, etc
β
βββ server/ # Node.js backend
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ middleware/ # Express middleware
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ package.json
β
βββ shared/ # Shared constants
βββ package.json # Root package.json
git clone https://github.com/yourusername/formsync.git
cd formsync
cd server && npm install
cd ..
Set up environment variables
Create a .env file in the server directory:
# Server Configuration
NODE_ENV=development
PORT=3001
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/
# Client URL
CLIENT_URL=http://localhost:5173
# JWT Secret
JWT_SECRET=your-super-secret-jwt-key
# Session Secret
SESSION_SECRET=your-super-secret-session-key
# If using local MongoDB
mongod
Run the application
Development mode (from root directory):
npm run dev
This will start the server on port 3001. The frontend is served directly by Express.
GET /api/forms/templates - Get available form templatesPOST /api/forms - Create a new formGET /api/forms/:formId - Get form by IDPATCH /api/forms/:formId - Update formDELETE /api/forms/:formId - Delete formGET /api/forms/user - Get userβs formsPOST /api/auth/login - User login/registration (simplified)GET /api/auth/user/:userId - Get user by IDPOST /api/auth/logout - User logoutGET /api/users - Get all users (admin/debugging)GET /api/users/:userId - Get user detailsPUT /api/users/:userId - Update user dataPOST /api/users/:userId/forms - Add form to userβs historyGET /api/users/:userId/forms - Get userβs form historyPOST /api/screenshots/upload - Upload screenshot (multipart/form-data)POST /api/screenshots/upload-base64 - Upload screenshot as base64GET /api/screenshots/:screenshotId - Get screenshot by IDGET /api/screenshots/form/:formId - Get all screenshots for a formDELETE /api/screenshots/:screenshotId - Delete screenshotjoin_form - Join a form sessionfield_lock - Lock a field for editingfield_unlock - Unlock a fieldfield_update - Update field valuewebrtc_offer - Send WebRTC offerwebrtc_answer - Send WebRTC answerwebrtc_ice_candidate - Send ICE candidatescreenshot_added - Add screenshotform_joined - Successfully joined formuser_joined - Another user joineduser_left - User left the formusers_update - Active users list updatedfield_locked - Field locked by userfield_unlocked - Field unlockedfield_updated - Field value updatedscreenshot_added - New screenshot available# Run server tests
cd server && npm test
# Run client tests
cd client && npm test
# Build client
cd client && npm run build
# The built files will be in client/dist
NODE_ENV=productiongit checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by the FormSync team