Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/meekb/explorepolandbe

Ruby on Rails API for the Explore Poland FE project
https://github.com/meekb/explorepolandbe

backend poland postgre ruby-on-rails

Last synced: 9 days ago
JSON representation

Ruby on Rails API for the Explore Poland FE project

Awesome Lists containing this project

README

        

# Explore Poland API

This repository contains the backend API for the Explore Poland project, built with Ruby on Rails. The API provides data about various Polish cities and their attractions. It is designed to be consumed by the front-end application [Explore Poland Frontend](https://github.com/your-username/explore-poland-frontend) built with Nuxt.js and Vue.js.

## Table of Contents

- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Seeding the Database](#seeding-the-database)
- [Usage](#usage)
- [API Endpoints](#api-endpoints)
- [Contributing](#contributing)
- [License](#license)

## Getting Started

To get a local copy up and running, follow these simple steps.

### Prerequisites

Ensure you have the following installed:

- Ruby 3.x
- Rails 7.x
- PostgreSQL

### Installation

1. Clone the repository: `git clone [email protected]:Meekb/ExplorePolandBE.git explore_poland_be`
2. Navigate to the project directory: `cd explore_poland_be`
3. Install required gems: `bundle install`
4. Set up the database: `rails db:create`, `rails db:migrate`

### Seeding the Database

The `seeds.rb` file contains initial data for Polish cities and their attractions.
You can seed the database by running: `rails db:seed`

### Usage
Start the rails server: `rails server`
The API will be running at `http://localhost:3000`

### API Endpoints

#### Below are some of the main API endpoints:

GET /cities - Retrieve a list of all cities
GET /cities/:id - Retrieves details for a specific city
GET /cities/:id/attractions - Retrieve a list of attractions for a specific city.

### Contributing

#### Contributions are welcome! Please follow these steps to contribute:

Fork the repository.
Create a new branch (git checkout -b feature/YourFeature).
Make your changes and commit them (git commit -m 'Add Your Feature').
Push to the branch (git push origin feature/YourFeature).
Open a Pull Request.

### License

This project is licensed under the MIT License - see the LICENSE file for details.