🌐 Live Site: players.thomasscheiber.com
A full-stack web application for managing player profiles with CRUD operations, built with Node.js, Express, MongoDB, and EJS templating.
- Create Players: Add new player profiles with username, full name, and bio
- View All Players: Browse through all registered players
- View Details: See individual player information
- Update Players: Edit existing player profiles
- Delete Players: Remove players from the database
- Responsive Design: Clean, user-friendly interface
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB Atlas - Cloud database solution
- Mongoose - MongoDB object modeling
- EJS - Embedded JavaScript templating
- Morgan - HTTP request logger middleware
- Lodash - Utility library
# Install dependencies
npm install
# Start the server (requires MongoDB connection string)
npm startThe application will run on http://localhost:3000
No database handy?
SetDISABLE_DB=true(or simply omitMONGODB_URI) to boot the app with a small JSON-backed datastore that lives indata/localPlayers.json.
Player Management App/
├── controllers/ # Route controllers
│ └── playerController.js
├── models/ # Database models
│ └── player.js
├── routes/ # Express routes
│ └── playerRoutes.js
├── views/ # EJS templates
│ ├── index.ejs
│ ├── create.ejs
│ ├── details.ejs
│ └── about.ejs
├── public/ # Static files (CSS, images)
├── docs/ # Blog documentation
└── index.js # Main application file
The application uses MongoDB Atlas for cloud database storage with Mongoose as the ODM (Object Data Mapper).
When a MongoDB connection string is not provided (or DISABLE_DB=true), the
server automatically falls back to a file-backed data store so you can still
demo the UI and CRUD flows without any external services.
{
username: String,
fullname: String,
bio: String
}GET /- Redirects to players listGET /players- View all playersGET /players/create- Create new player formPOST /players- Submit new playerGET /players/:id- View player detailsDELETE /players/:id- Delete a playerGET /about- About page
- Models: Mongoose schemas for data structure
- Views: EJS templates for dynamic HTML
- Controllers: Business logic and request handling
- Morgan for request logging
- Express static for serving public files
- Body parser for form data
- Create, Read, Update, Delete (CRUD) operations
- MongoDB connection handling
- Error handling for database operations
This project demonstrates:
- RESTful API design
- Express.js middleware
- MongoDB database integration
- Server-side templating with EJS
- MVC architecture pattern
- Asynchronous JavaScript
- Environment configuration
🌐 Live Site: players.thomasscheiber.com
To deploy this application:
- Set up MongoDB Atlas cluster
- Update connection string with your credentials
- Configure environment variables
- Deploy to your hosting platform (Coolify, Heroku, DigitalOcean, etc.)
Remember to:
- Update MongoDB connection string with your own credentials
- Never commit sensitive data (passwords, API keys) to version control
- Use environment variables for production deployment
Built with Node.js 🟢 | Powered by MongoDB 🍃 | Styled with EJS 📄