{"id":15170804,"url":"https://github.com/antonharbers/members-only","last_synced_at":"2026-02-22T23:02:39.572Z","repository":{"id":217176336,"uuid":"743236918","full_name":"AntonHarbers/Members-Only","owner":"AntonHarbers","description":"Members Only - The Odin Project: https://www.theodinproject.com/lessons/nodejs-members-only","archived":false,"fork":false,"pushed_at":"2024-01-16T14:51:30.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T07:39:39.578Z","etag":null,"topics":["authentication","css","express","jade","javascript","mongodb","mongoose","node","passport","pug","routes","theodinproject"],"latest_commit_sha":null,"homepage":"https://evening-ordinary-anatosaurus.glitch.me/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonHarbers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-14T18:29:31.000Z","updated_at":"2024-02-25T22:33:54.000Z","dependencies_parsed_at":"2024-08-23T14:35:30.459Z","dependency_job_id":null,"html_url":"https://github.com/AntonHarbers/Members-Only","commit_stats":null,"previous_names":["antonharbers/members-only"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AntonHarbers/Members-Only","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2FMembers-Only","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2FMembers-Only/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2FMembers-Only/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2FMembers-Only/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonHarbers","download_url":"https://codeload.github.com/AntonHarbers/Members-Only/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2FMembers-Only/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29730229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","css","express","jade","javascript","mongodb","mongoose","node","passport","pug","routes","theodinproject"],"created_at":"2024-09-27T08:23:04.562Z","updated_at":"2026-02-22T23:02:39.521Z","avatar_url":"https://github.com/AntonHarbers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Members Only - The Odin Project\n\n## Introduction\n\n**Members-Only** is a sophisticated full-stack web application built using Express, MongoDB, JavaScript, and Passport. This project, designed as part of The Odin Project curriculum, offers a platform where users can share messages anonymously. Only after logging in can the members see who authored each message, bringing a unique twist to the traditional messaging app.\n\n## Features\n\n- **User Authentication**: Secure login/logout functionality, including password encryption.\n- **Message Posting**: Members can post, view, and delete messages.\n- **Admin Privileges**: Admin users can manage messages and user roles.\n- **Responsive Design**: Crafted to provide a seamless experience across various devices.\n\n## Live Demo\n\nCheck out the live version of the application [here](https://evening-ordinary-anatosaurus.glitch.me/).\n\n## Getting Started\n\nThese instructions will help you set up a copy of the project on your local machine for development and testing purposes.\n\n### Prerequisites\n\n- Node.js\n- MongoDB\n\n### Installation\n\n1. **Clone the Repository:**\n   ```bash\n   git clone https://github.com/AntonHarbers/Members-Only.git\n   ```\n2. **Navigate to the directory:**\n   ```bash\n   cd Members-Only\n   ```\n3. **Install Dependencies:**\n   ```bash\n   npm install\n   ```\n4. **Set Up Environment Variables:**\n   Create a `.env` file in the root directory and add the following:\n   ```\n   MONGO_URL_DEV=\u003cYour MongoDB Connection String\u003e\n   SESSION_SECRET=\u003cYour Session Secret\u003e\n   ```\n5. **Run the Application:**\n   ```bash\n   npm start\n   ```\n\n## Technologies Used\n\n- **Node.js**: JavaScript runtime for the backend.\n- **Express**: Web application framework for Node.js.\n- **MongoDB**: NoSQL database to store user data and messages.\n- **Passport.js**: Authentication middleware for\n\nNode.js.\n\n- **Bcrypt.js**: Library for hashing passwords.\n- **Pug**: Templating engine for rendering HTML.\n\n## Project Structure\n\n- `/controllers`: Business logic for handling HTTP requests.\n- `/models`: Schema definitions for MongoDB.\n- `/views`: Pug templates for HTML structure.\n- `/public`: Static files like CSS and JavaScript.\n- `/routes`: Definitions of application routes.\n\nCertainly! Here's the API documentation section for the Members-Only project:\n\n---\n\n## API Documentation\n\nThis section provides detailed documentation for the API routes used in the Members-Only application. Each route is designed to handle specific functionalities related to user interactions and message management.\n\n### User Authentication Routes\n\n####\n\n1. **Sign Up**\n\n   - **Endpoint**: `/sign-up`\n   - **Method**: `GET`\n   - **Description**: Renders the sign-up form for new users.\n   - **Response**: HTML form for user registration.\n\n   - **Method**: `POST`\n   - **Description**: Processes user registration data.\n   - **Request Body**:\n     ```json\n     {\n       \"username\": \"string\",\n       \"password\": \"string\",\n       \"firstName\": \"string\",\n       \"lastName\": \"string\"\n     }\n     ```\n   - **Response**: Redirect to the home page upon successful registration.\n\n2. **Log In**\n\n   - **Endpoint**: `/log-in`\n   - **Method**: `GET`\n   - **Description**: Displays the login form.\n   - **Response**: HTML form for user login.\n\n   - **Method**: `POST`\n   - **Description**: Authenticates the user.\n   - **Request Body**:\n     ```json\n     {\n       \"username\": \"string\",\n       \"password\": \"string\"\n     }\n     ```\n   - **Response**: Redirect to the home page upon successful login.\n\n3. **Log Out**\n   - **Endpoint**: `/log-out`\n   - **Method**: `POST`\n   - **Description**: Logs out the current user.\n   - **Response**: Redirect to the home page.\n\n### Message Management Routes\n\n1. **Post a New Message**\n\n   - **Endpoint**: `/messages/new`\n   - **Method**: `GET`\n   - **Description**: Renders the form to post a new message.\n   - **Response**: HTML form for posting a new message.\n\n   - **Method**: `POST`\n   - **Description**: Submits a new message.\n   - **Request Body**:\n     ```json\n     {\n       \"title\": \"string\",\n       \"content\": \"string\"\n     }\n     ```\n   - **Response**: Redirect to the home page with the new message posted\n\n.\n\n2. **Delete a Message**\n   - **Endpoint**: `/messages/delete`\n   - **Method**: `POST`\n   - **Description**: Deletes a specific message. Only accessible by admin users.\n   - **Request Body**:\n     ```json\n     {\n       \"messageId\": \"string\"\n     }\n     ```\n   - **Response**: Redirect to the home page after deletion.\n\n## Contributing\n\nPlease note that contributions to this project are not welcome as it is a personal portfolio piece. However, feel free to fork and experiment with the code for your learning and exploration.\n\n## Authors\n\n- **Anton Harbers** - _Initial work_\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.\n\n## Acknowledgments\n\n- The Odin Project community for the inspiration and guidance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonharbers%2Fmembers-only","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonharbers%2Fmembers-only","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonharbers%2Fmembers-only/lists"}