https://github.com/robsonmt/code-challenge-mettzer
https://github.com/robsonmt/code-challenge-mettzer
erb-template postgresql ruby-on-rails
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/robsonmt/code-challenge-mettzer
- Owner: RobsonMT
- Created: 2025-07-29T02:11:17.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-31T23:24:21.000Z (11 months ago)
- Last Synced: 2025-08-23T07:09:20.171Z (10 months ago)
- Topics: erb-template, postgresql, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# š° Mettzer News - Projeto Ruby on Rails
Este projeto Ć© uma aplicação Ruby on Rails que consome notĆcias pĆŗblicas via API, permite ao usuĆ”rio salvar artigos para leitura posterior, autenticar com Devise e visualizar seus salvos.
---
## š Tecnologias
- Ruby 3.0.2
- Rails 7.x
- PostgreSQL
- Devise (autenticação)
- TailwindCSS
- NewsAPI
---
## āļø PrĆ©-requisitos
Antes de comeƧar, instale:
- [Ruby 3.0.2](https://www.ruby-lang.org/)
- [Rails](https://rubyonrails.org/) (`gem install rails`)
- [PostgreSQL](https://www.postgresql.org/)
- [Bundler](https://bundler.io/) (`gem install bundler`)
- Node.js e Yarn (`sudo apt install nodejs yarn`)
---
## š„ Passo a passo para rodar o projeto
### 1. Clone o repositório
```bash
git clone git@github.com:RobsonMT/Code-Challenge-Mettzer.git
cd Code-Challenge-Mettzer
```
### 2. Instale as dependĆŖncias
```bash
bundle install
```
### 3. Configure as variƔveis de ambiente
Crie um arquivo `.env` na raiz do projeto:
```env
NEWS_API_KEY=sua_chave_da_api
```
Caso não possua uma chave de api, acesse: [https://newsapi.org/](https://newsapi.org/)
### 4. Instale a gem `dotenv-rails` caso não tenha:
```bash
bundle add dotenv-rails
```
### 5. Configure o banco de dados
Edite `config/database.yml` conforme seu usuƔrio/senha PostgreSQL.
Depois, crie e migre o banco:
```bash
rails db:create db:migrate
```
### 6. Inicie o servidor
```bash
rails server
```
Acesse: [http://localhost:3000](http://localhost:3000)
---
## š„ Funcionalidades
- Registro e login de usuƔrios com Devise
- Pesquisa de artigos via API externa
- Salvar artigos para ler mais tarde
- Listagem e remoção dos artigos salvos
- Interface responsiva com TailwindCSS