https://github.com/nanafox/members-only
A simple members only social media site. This is part of TheOdinProject Ruby on Rails curriculum
https://github.com/nanafox/members-only
authentication members-only ruby-on-rails
Last synced: 2 months ago
JSON representation
A simple members only social media site. This is part of TheOdinProject Ruby on Rails curriculum
- Host: GitHub
- URL: https://github.com/nanafox/members-only
- Owner: nanafox
- License: mit
- Created: 2024-12-03T20:38:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-24T16:52:11.000Z (over 1 year ago)
- Last Synced: 2025-04-02T13:24:24.822Z (about 1 year ago)
- Topics: authentication, members-only, ruby-on-rails
- Language: Ruby
- Homepage: https://authpost.lzcorp.tech
- Size: 287 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Members-Only (AuthPost) Project
This project is part of [The Odin Project](https://theodinproject.com)
Ruby on Rails curriculum. It demonstrates how to build a basic authentication
system and a private content-sharing platform. Users can log in and post
messages, but only authenticated users can view the authors of those messages.
The project emphasizes working with associations, validations,
and authentication in Rails.
## Features
- **User Authentication**:
- Users can sign up, log in, and log out.
- Passwords are securely hashed using Devise.
- **Post Management**:
- Logged-in users can create, edit, and delete posts.
- Public users can view posts but cannot see the post authors.
- **Authorization**:
- Post authorship is hidden from users who are not logged in.
- Secure routes ensure only authenticated users can access protected resources.
## Technologies Used
- **Ruby on Rails**: Backend framework for creating the application.
- **PostgreSQL**: Database for storing user and post data.
- **Devise**: For handling user authentication.
- **Action Text**: To enable rich-text editing for posts.
- **Bootstrap**: For responsive styling and design.
## Getting Started
Follow these steps to set up the project locally:
### Prerequisites
- Ruby 3.3.x
- Rails 8.0.x
- PostgreSQL
- Node.js and Yarn (for Rails asset pipeline)
### Installation
1. Clone the repository:
```bash
git clone https://github.com/nanafox/members-only.git
cd members-only
```
2. Install dependencies:
```bash
bundle install
yarn install
```
3. Set up the database:
```bash
rails db:create
rails db:migrate
rails db:seed
```
4. Start the Rails server:
```bash
rails server
```
5. Visit the application at `http://localhost:3000`.
## Testing
The application uses Minitest for testing. To run the tests, use:
```bash
rails test test:system
```
## Future Improvements
- Implementing role-based access control (e.g., admin privileges).
- Adding pagination to handle large datasets of posts.
- Enhancing the UI/UX with more advanced CSS or frontend frameworks.
## Acknowledgments
This project was inspired by **The Odin Project**. The curriculum provides an
excellent foundation for web development and Rails expertise.
Learn more at [theodinproject.com](https://theodinproject.com).
## License
This project is open source and available under the MIT License.
See the `LICENSE` file for more details.