Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omar25ahmed/bevatel-backend-task
https://github.com/omar25ahmed/bevatel-backend-task
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/omar25ahmed/bevatel-backend-task
- Owner: omar25ahmed
- License: mit
- Created: 2022-12-21T19:36:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-26T00:59:33.000Z (about 2 years ago)
- Last Synced: 2024-11-22T23:43:47.813Z (about 2 months ago)
- Language: Ruby
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bevatel backend task
> Bevatel backend task
In this task you should create an app that have two essential models (school / students) each school should have many students and when you delete it should be soft deleted and the record will persist in the database also it should have user model and an api for the students this api should have authentication system to be able to do the crud action for the students.
## Built With
- Ruby on Rails
## Getting Started
### Prerequisites
- Ruby
- Postgres server### Setup
Clone this repo and enter the directory.
```sh
[email protected]:omar25ahmed/bevatel-backend-task.git && cd bevatel-backend-task
```### Install
Run the following command to install all the dependencies.
```sh
bundler install
```### Usage
Run the following command to start the server, then go to http://localhost:3000
```sh
rails db:create # create database
rails db:migrate # migrate tables
rails db:seed # load all data in database from seed.rbbin/dev # necessary to start the app for the first time
---- or ----
rails s # can be used after starting the app at least once
```### Usage via Docker
Run the following command to start the server by Docker, then go to http://localhost:3000
```sh
docker-compose down # to drop any existing container
docker-compose up --build # to start a new container
docker-compose run web rails db:create # create database
docker-compose run web rails db:migrate # migrate tables
docker-compose run web rails db:seed # load all data in database from seed.rb
```### Run tests
```sh
bundle exec rspec spec
```## Author
👤 **Omar Ragheb**
- GitHub: [https://github.com/omar25ahmed](https://github.com/omar25ahmed)
- LinkedIn: [https://www.linkedin.com/in/omar-ragheb/](https://www.linkedin.com/in/omar-ragheb/)
- Twitter: [https://twitter.com/Omar25Ahmed](https://twitter.com/Omar25Ahmed)## Show your support
Give a ⭐️ if you like this project!