RenchTech is a Node.js/Express application that provides project management and community features with user authentication. The application uses MongoDB for data storage and Passport.js for authentication.
The application uses Passport.js with a local strategy for authentication. Users can register and login using email/password credentials.
- Development:
http://<IP>:<PORT>
- Production: Depends on Azure deployment
POST /register
Parameters:
username
(string): User's email addresspassword
(string): User's password
Response:
- Redirects to
/community
on success - Flash messages for errors
POST /login
Parameters:
username
(string): User's email addresspassword
(string): User's password
Response:
- Redirects to
/community
on success - Flash messages for errors
GET /logout
Response:
- Redirects to
/
on success
GET /projects
Response:
- Renders project index page with all projects
POST /projects
Parameters:
title
(string): Project titledescription
(string): Project description- Authentication required
Response:
- Redirects to project show page on success
- Flash messages for errors
GET /projects/:id
Parameters:
id
(string): Project ID
Response:
- Renders project detail page
PUT /projects/:id
Parameters:
id
(string): Project IDtitle
(string): Updated project titledescription
(string): Updated project description- Authentication required
- Must be project owner
Response:
- Redirects to project show page on success
- Flash messages for errors
DELETE /projects/:id
Parameters:
id
(string): Project ID- Authentication required
- Must be project owner
Response:
- Redirects to projects index on success
- Flash messages for errors
GET /community
Response:
- Renders community page with posts
POST /community
Parameters:
title
(string): Post titlecontent
(string): Post content- Authentication required
Response:
- Redirects to community show page on success
- Flash messages for errors
POST /community/:id/comments
Parameters:
id
(string): Community post IDtext
(string): Comment text- Authentication required
Response:
- Redirects to community post on success
- Flash messages for errors
PUT /community/:id/comments/:comment_id
Parameters:
id
(string): Community post IDcomment_id
(string): Comment IDtext
(string): Updated comment text- Authentication required
- Must be comment owner
Response:
- Redirects to community post on success
- Flash messages for errors
DELETE /community/:id/comments/:comment_id
Parameters:
id
(string): Community post IDcomment_id
(string): Comment ID- Authentication required
- Must be comment owner
Response:
- Redirects to community post on success
- Flash messages for errors
The application requires the following environment variables:
DATABASE_URL=<mongodb-connection-string>
PORT=<port-number>
IP=<ip-address>
NODE_ENV=<development|production>
The application includes Azure deployment scripts:
# Deploy to Azure
npm run "az deploy"
# Update existing deployment
npm run "az update"
# Stop the application
npm run "az stop"
- Express-sanitizer for input sanitization
- Session management with express-session
- Flash messages for user notifications
- Passport.js authentication
- MongoDB for secure data storage
Major dependencies include:
- Express.js
- Mongoose
- Passport.js
- EJS templating
- Express-session
- Connect-flash
- Moment.js
For a complete list of dependencies, please refer to package.json
.