linkedin-clone-rails-backend
linkedin-clone-rails-backend copied to clipboard
:rocket: API to power a software similar to LinkedIn
API to power a software similar to LinkedIn
A clone of LinkedIn software with basic functionalities.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
API documentation
The API documentation is available here.
Prerequisites
What things you need to install the software and how to install them:
Installing
1. Clone the repository
git clone [email protected]:ghoshnirmalya/linkedin-rails.git && cd linked-rails
2. Build the project
docker-compose build
3. Create the database
docker-compose run linkedin.rails.web rake db:create
4. Copy the env files
cp .env.development.example .env.development && cp .env.test.example .env.test
5. Run the migrations
docker-compose run linkedin.rails.web rake db:migrate
Please have a look at Quickstart: Compose and Rails if you run into any trouble while installing.
Running the tests
You can run all the specs using the following command:
docker exec -it linkedin-rails_linkedin.rails.web_1 rspec .
If you want to run a single spec, use the following pattern:
docker exec -it linkedin-rails_linkedin.rails.web_1 rspec spec/controllers/v1/users_controller_spec.rb
You'll have to update the .env
files to make all the specs pass.
Checking the logs
You can check the development logs using the following command:
docker exec -it linkedin-rails_linkedin.rails.web_1 tail -f log/development.log
If you want to check the test logs, you'll need to use the following command:
docker exec -it linkedin-rails_linkedin.rails.web_1 tail -f log/test.log
Built With
- Ruby on Rails - The web framework used to build the app
- Docker - Used to containerize the app
- Postgresql - The database used to store the data
Contributing
If you find any bugs, please feel free to create an issue for that.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- How to Test Rails Models with RSpec
- Writing One-Liner RSpec Tests in Rails with Shoulda-Matchers
- An Introduction to Using JWT Authentication in Rails
- Token-based authentication with Ruby on Rails 5 API
- Simple approach to Rails 5 API authentication with Json Web Token
- Tutorial: Create a simple messaging system on Rails
- How to test Rails mailers using RSpec
- Sending emails with ActionMailer and Sidekiq
- RSpec Cheatsheet
- Factory Bot cheatsheet
Todo
- [x] Authentication
- [x] Make APIs follow JSON-API specification
- [x] Users Listing API
- [x] Search (for Users)
- [x] Companies Listing API
- [x] Search (for Companies)
- [x] Jobs Listing API
- [x] Search (for Jobs)
- [x] Conversations Listing API
- [x] Messages belonging to a conversation Listing API
- [x] Send an email after a new user signs up
- [x] Send an email after an existing user requests for a new password