Live Site: https://cloverpdfs.org
This project is an upgraded version of the Wild West Forum midterm. It adds SQLite database persistence, secure authentication, user profiles, account lockout, real-time chat, enhanced comments, and HTTPS deployment using Nginx Proxy Manager.
-
Open Terminal
-
SSH into the server
ssh -p 2004 kateamartell@157.245.112.126
3.Navigate to the project
cd Final-Project/backend
4.Install dependencies
npm install
-
Start the server
npm start
-
Open a browser
Navigate to https://cloverpdfs.org
-
Optional environment variables:
-
PORT (default 3000)
-
SESSION_SECRET
-
NODE_ENV=production
-
The application uses SQLite3 for persistent storage.
-
Data survives server restarts.
-
users
-
sessions
-
comments
-
login_attempts
-
chat_messages
-
The site is deployed behind Nginx Proxy Manager using a Let’s Encrypt SSL certificate.
-
All traffic is forced over HTTPS
-
WebSockets are enabled
-
A custom /socket.io/ proxy location is configured to support real-time chat
-
Passwords are hashed using Argon2
-
Plaintext passwords are never stored
-
Password strength requirements are enforced
-
Login attempts are logged with IP and timestamp
-
Accounts are temporarily locked after repeated failed login attempts
-
Sessions are stored securely in SQLite
Users have:
-
Username (login only)
-
Email (unique)
-
Display name (shown publicly)
-
Profile page allows:
-
Changing password (forces re-login)
-
Changing email
-
Changing display name
-
Profile customization (color/avatar)
-
Comments are paginated using page-based navigation
-
Comments support Markdown formatting (sanitized)
-
Users can edit their own comments
-
Users can delete their own comments
-
Comments support upvote and downvote reactions
-
Live chat implemented using Socket.io
-
Messages appear instantly to all connected users
-
Chat history is stored in the database
-
Messages display display name, profile color, and timestamp
-
GET /api/chat returns recent chat messages
-
Socket.io events handle sending and receiving chat messages
-
SQLite chosen for simplicity and reliability
-
Server-side sessions used for improved security
-
Soft deletes used for comments
-
HTTPS handled by reverse proxy instead of Node
-
Custom Socket.io proxy location required for WebSockets
-
Password recovery email not implemented
-
No image upload for avatars
-
Single-server deployment
-
The following were tested:
-
User registration and login
-
Account lockout after failed logins
-
Profile updates
-
Comment pagination
-
Comment editing, deleting, voting, and Markdown
-
Real-time chat between browsers
-
HTTPS connection
-
Database persistence after restart