Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PG_USER = postgres
PG_PASSWORD = teste
PG_HOST = localhost
PG_PORT = 5432
PG_DATABASE = historic_database
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
.env
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
42 changes: 26 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
# Desafio técnico para desenvolvedores
<h1 align="center">
Desafio técnico para desenvolvedores
</h1>

Construa uma nova aplicação, utilizando o framework de sua preferência (Ruby on Rails, Elixir Phoenix, Python Django ou Flask, NodeJS Sails, Java Spring, ASP.NET ou outro), a qual deverá conectar na API do GitHub e disponibilizar as seguintes funcionalidades:
## Projeto

- Botão para buscar e armazenar os repositórios destaques de 5 linguagens à sua escolha;
- Listar os repositórios encontrados;
- Visualizar os detalhes de cada repositório.
Esta é uma aplicação em que é apresentado os principais repositórios de 5 linguagens diferentes.[Java, Python, Javascript, Typescript e Ruby]

Alguns requisitos:
<br>

- Deve ser uma aplicação totalmente nova;
- A solução deve estar em um repositório público do GitHub;
- A aplicação deve armazenar as informações encontradas;
- Utilizar PostgreSQL, MySQL ou SQL Server;
- O deploy deve ser realizado, preferencialmente, no Heroku, AWS ou no Azure;
- A aplicação precisa ter testes automatizados;
- Preferenciamente dockerizar a aplicação;
- Por favor atualizar o readme da aplicação com passo a passo com instrução para subir o ambiente.
## Screens

Quando terminar, faça um Pull Request neste repo e avise-nos por email.
![](https://i.postimg.cc/65Mr3w18/Capture.png)

**IMPORTANTE:** se você não conseguir finalizar o teste, por favor nos diga o motivo e descreva quais foram as suas dificuldades. Você pode também sugerir uma outra abordagem para avaliarmos seus skills técnicos, vender seu peixe, mostrar-nos do que é capaz.
<br>

## Heroku

https://safe-scrubland-96765.herokuapp.com/

<br>

# Tecnologias

- React
- Express
- Axios
- Styled-Components
- Antd
- React Testing Library

<br> <br>
11 changes: 11 additions & 0 deletions database.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- CREATE DATABASE historic_database;

--\c into historic_database

CREATE TABLE hist(
hist_id SERIAL PRIMARY KEY,
language VARCHAR(255),
owner VARCHAR(255),
title VARCHAR(255),
description TEXT
);
22 changes: 22 additions & 0 deletions db.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const Pool = require("pg").Pool;
require("dotenv").config();

// const devConfig = {
// user: process.env.PG_USER,
// password: process.env.PG_PASSWORD,
// database: process.env.PG_DATABASE,
// host: process.env.PG_HOST,
// port: process.env.PG_PORT,
// };

const devConfig = `postgresql://${process.env.PG_USER}:${process.env.PG_PASSWORD}@${process.env.PG_HOST}:${process.env.PG_PORT}/${process.env.PG_DATABASE}`;

const proConfig = process.env.DATABASE_URL;

const pool = new Pool({
connectionString:
process.env.NODE_ENV === "production" ? proConfig : devConfig,
ssl: process.env.DATABASE_URL ? true : false,
});

module.exports = pool;
23 changes: 23 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
46 changes: 46 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
16 changes: 16 additions & 0 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files": {
"main.css": "/static/css/main.56a71bdf.css",
"main.js": "/static/js/main.0927a5f1.js",
"static/js/787.cda612ba.chunk.js": "/static/js/787.cda612ba.chunk.js",
"static/media/fork.png": "/static/media/fork.9de9b8231f30b3254e3b.png",
"index.html": "/index.html",
"main.56a71bdf.css.map": "/static/css/main.56a71bdf.css.map",
"main.0927a5f1.js.map": "/static/js/main.0927a5f1.js.map",
"787.cda612ba.chunk.js.map": "/static/js/787.cda612ba.chunk.js.map"
},
"entrypoints": [
"static/css/main.56a71bdf.css",
"static/js/main.0927a5f1.js"
]
}
Binary file added frontend/build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.0927a5f1.js"></script><link href="/static/css/main.56a71bdf.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
Binary file added frontend/build/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/build/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions frontend/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions frontend/build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
12 changes: 12 additions & 0 deletions frontend/build/static/css/main.56a71bdf.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/build/static/css/main.56a71bdf.css.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions frontend/build/static/js/787.cda612ba.chunk.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading