{"id":19945491,"url":"https://github.com/odilson-dev/members-only-nodejs","last_synced_at":"2026-05-09T22:05:50.685Z","repository":{"id":255900153,"uuid":"852346296","full_name":"odilson-dev/members-only-nodejs","owner":"odilson-dev","description":"Members only club written using Express.js, EJS for templating/frontend, PosgreSQL | deployed using adaptable.io","archived":false,"fork":false,"pushed_at":"2024-09-16T20:41:04.000Z","size":157,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T20:52:43.783Z","etag":null,"topics":["authentication","epressjs","nodejs","postgresql-database"],"latest_commit_sha":null,"homepage":"https://members-only-node.adaptable.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/odilson-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-04T16:43:04.000Z","updated_at":"2024-09-16T20:41:07.000Z","dependencies_parsed_at":"2024-09-16T20:45:17.994Z","dependency_job_id":"4136b757-d9c2-411a-9e0d-9c6fd2463445","html_url":"https://github.com/odilson-dev/members-only-nodejs","commit_stats":null,"previous_names":["odilson-dev/members-only-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fmembers-only-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fmembers-only-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fmembers-only-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fmembers-only-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odilson-dev","download_url":"https://codeload.github.com/odilson-dev/members-only-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241374515,"owners_count":19952544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","epressjs","nodejs","postgresql-database"],"created_at":"2024-11-13T00:25:45.120Z","updated_at":"2026-05-09T22:05:50.641Z","avatar_url":"https://github.com/odilson-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Members Only Project\n\n### Introduction\n\nThe **Members Only Project** is an exclusive online clubhouse where users can write anonymous posts. Only authenticated members with special privileges can see the identity of the post authors, while non-members can view the posts without knowing who wrote them. This project focuses on user authentication, role-based access control, and database management, and it’s part of The Odin Project’s NodeJS curriculum.\n\n![Screen capture](./images/Screenshot_2024-09-16_13-01-02.png)\n\n### Features\n\n- **User Registration \u0026 Login:**\n  - Users can sign up using their first name, last name, email and password.\n  - Secure password storage using bcrypt for hashing.\n  - Login is handled through Passport.js authentication middleware.\n- **Member-Only Privileges:**\n\n  - Users must input a secret passcode to gain exclusive membership status.\n  - Members can view additional details about each post, including the author’s name and timestamp.\n\n- **Post Creation \u0026 Viewing:**\n  - Authenticated users can create posts with a title and body text.\n  - Posts are viewable by all users, but only members can see the author and date.\n- **Admin Access:**\n  - Admins have special privileges, including the ability to delete posts.\n  - Admin access is granted by entering an admin secret code or through manual promotion in the database.\n\n### Installation\n\n#### Live Demo\n\nCheck out the live version of the app: [Live Demo](https://members-only-node.adaptable.app/)\n\n#### Local Installation\n\nTo run the app locally, follow these steps:\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/odilson-dev/members-only-nodejs.git\n   ```\n2. **Install dependencies:**\n\n```\n   cd members-only-nodejs\n   npm install\n```\n\n3. **Set up environment variables**\n\n- Create a .env file in the root directory and add the following variables:\n  bash\n  Copy code\n\n```bash\nDATABASE_URL=your_postgresql_database_uri\nADMIN_ACCESS=your_admin_password\nACCESS_CODE=your_membership_access_code\n```\n\n- DATABASE_URL: Connection string for your PostgreSQL database.\n- ADMIN_ACCESS: Password for admin-level access.\n- ACCESS_CODE: Secret passcode required for users to become members.\n- COOKIE_SECRET: A random string for securing session cookies.\n\n### Usage\n\n- **Signup/Login**: Create a user account and log in.\n- **Join the Club**: Enter the secret passcode to gain membership.\n- **Post Messages**: Authenticated users can post anonymously.\n- **Admin Controls**: Admins can delete posts if they have admin privileges.\n\n### Technologies Used\n\n- **[Node.js](https://nodejs.org/)**: A runtime environment for executing JavaScript on the server-side.\n- **[Express](https://expressjs.com/)**: A fast, unopinionated web framework for Node.js.\n- **[PostgreSQL](https://www.postgresql.org/)**: An open-source relational database management system for storing user data and posts.\n- **[Passport.js](https://www.passportjs.org/)**: Middleware for authentication with username and password.\n- **[bcrypt](https://github.com/kelektiv/node.bcrypt.js)**: Library for hashing passwords.\n- **[Express Validator](https://express-validator.github.io/)**: Middleware for validating and sanitizing user input.\n- **[EJS](https://ejs.co/)**: Templating engine used to generate HTML markup with JavaScript.\n\n### Conclusion\n\nThis project is part of [The Odin Project](https://www.theodinproject.com/), and you are free to use and modify the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodilson-dev%2Fmembers-only-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodilson-dev%2Fmembers-only-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodilson-dev%2Fmembers-only-nodejs/lists"}