-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Climier-code/develop
Publish WegoUp v1.0
- Loading branch information
Showing
59 changed files
with
3,160 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# API KEY | ||
/src/key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,150 @@ | ||
# 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: | ||
|
||
### `yarn 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. | ||
|
||
### `yarn 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. | ||
|
||
### `yarn 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. | ||
|
||
### `yarn 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/). | ||
# We go Up! | ||
|
||
> [한강물 측정기](https://hangang.ivlis.kr/) 홈페이지에서 영감을 받아 만든 웹페이지 | ||
// gif 추가 예정 | ||
|
||
## Project Outline | ||
|
||
- 국내 해외의 증권시장의 상황(주가 및 나라별 뉴스)을 한 곳에서 파악하기 위해 만든 웹 개발 프로젝트 | ||
- 개발 인원: 1명(FrontEnd) | ||
- 프로젝트 기획 및 개발: 2021.4 ~ 2021.6 | ||
- 다양한 API를 활용하여 Restful한 개발 | ||
- `React` + `Typescript` 를 기반으로 한 정적타이핑 개발 | ||
- `Redux-saga` 를 활용한 데이터 비동기 전역 상태관리 | ||
- `Emotion.js`을 이용한 Css-in-js 스타일링 및 반응형 웹 페이지 개발 | ||
- `apexchart`를 이용한 실시간 Candle 차트 구현 | ||
|
||
## Main Feature | ||
|
||
- 국내, 해외, 비트코인 종목코드를 검색 시 | ||
- 실시간 주식 가격(시가, 상한가, 하한가) 렌더링 & 빨간색, 파란색 글씨로 상승과 하락 표시 | ||
- 실시간 비트코인 가격(200분 전 ~ 현재)의 데이터 수신 및 차트 렌더링 | ||
- 국내 주식, 해외 주식, 비트코인 페이지를 따로 만들어 관심있는 정보를 볼 수 있도록 만듦 | ||
- 국내, 해외 주식: 각 나라 별 명언, 주가 검색창, 뉴스 | ||
- 비트코인: 비트코인 검색창 및 차트 | ||
- 국내 or 해외 증권시장 오픈시간에 따라 다른 컴포넌트 구현 | ||
- 반응형 웹 페이지 | ||
|
||
## Project Structure | ||
|
||
```bash | ||
├── node_modules | ||
├── public | ||
├── build | ||
├── src | ||
│ ├── api | ||
│ │ ├── bitcoin.ts | ||
│ │ ├── krstocks.ts | ||
│ │ ├── usstocks.ts | ||
│ │ └── news.ts | ||
│ ├── backgroundImg | ||
│ │ ├── Anapji.jpg | ||
│ │ ├── Hangang-night.jpg | ||
│ │ ├── Hangang.jpg | ||
│ │ ├── Jeju.jpg | ||
│ │ └── Myeongdong.jpg | ||
│ ├── components | ||
│ │ ├── Advice | ||
│ │ │ ├── KRAdvice.tsx | ||
│ │ │ └── USAdvice.tsx | ||
│ │ ├── Bitcoin | ||
│ │ │ ├── ChartCandlesInfo.tsx | ||
│ │ │ └── SearchBitcoinform.tsx | ||
│ │ ├── News | ||
│ │ │ ├── NewsItem.tsx | ||
│ │ │ └── NewsList.tsx | ||
│ │ └── Stocks | ||
│ │ ├── KRStockLoader.tsx | ||
│ │ ├── USStockLoader.tsx | ||
│ │ ├── StockInfo.tsx | ||
│ │ └── SearchStockForm.tsx | ||
│ ├── container | ||
│ │ ├── Main.tsx | ||
│ │ ├── About.tsx | ||
│ │ ├── KrBusiness.tsx | ||
│ │ ├── UsBusiness.tsx | ||
│ │ ├── Bitcoin.tsx | ||
│ │ └── Header.tsx | ||
│ ├── key | ||
│ │ └── apikey.ts | ||
│ ├── modules | ||
│ │ ├── krstocks | ||
│ │ │ ├── actions.ts | ||
│ │ │ ├── index.ts | ||
│ │ │ ├── reducer.ts | ||
│ │ │ ├── saga.ts | ||
│ │ │ └── types.ts | ||
│ │ ├── usstocks | ||
│ │ │ ├── actions.ts | ||
│ │ │ ├── index.ts | ||
│ │ │ ├── reducer.ts | ||
│ │ │ ├── saga.ts | ||
│ │ │ └── types.ts | ||
│ │ ├── news | ||
│ │ │ ├── actions.ts | ||
│ │ │ ├── index.ts | ||
│ │ │ ├── reducer.ts | ||
│ │ │ ├── saga.ts | ||
│ │ │ └── types.ts | ||
│ │ ├── bitcoin | ||
│ │ │ ├── actions.ts | ||
│ │ │ ├── index.ts | ||
│ │ │ ├── reducer.ts | ||
│ │ │ ├── saga.ts | ||
│ │ │ └── types.ts | ||
│ │ └── index.ts | ||
│ ├── App.tsx | ||
│ ├── index.tsx | ||
│ └── setupProxy.js | ||
├── README.md | ||
├── LICENSE | ||
├── package.json | ||
├── tsconfig.json | ||
├── yarn.lock | ||
└── .gitignore | ||
``` | ||
|
||
## Requirements | ||
|
||
- Library | ||
<details> | ||
<summary>접기/펼치기 버튼</summary> | ||
<div markdown="1"> | ||
"typescript": "^4.1.2"<br/> | ||
"react": "^17.0.2"<br/> | ||
"@types/react": "^17.0.0" <br/> | ||
"axios": "^0.21.1"<br/> | ||
"redux": "^4.1.0" <br/> | ||
"react-redux": "^7.2.4"<br/> | ||
"@types/react-redux": "^7.1.16"<br/> | ||
"redux-saga": "^1.1.3"<br/> | ||
"typesafe-actions": "^5.1.0"<br/> | ||
"react-router-dom": "^5.2.0"<br/> | ||
"@types/react-router-dom": "^5.1.7"<br/> | ||
"react-icons-kit": "^1.3.1"<br/> | ||
"apexcharts": "^3.27.1"<br/> | ||
"react-apexcharts": "^1.3.9"<br/> | ||
"react-moment": "^1.1.1"<br/> | ||
"@emotion/core": "^11.0.0"<br/> | ||
"@emotion/styled": "^11.3.0"<br/> | ||
"http-proxy-middleware": "^2.0.0"<br/> | ||
</div> | ||
</details> | ||
|
||
- API | ||
<details> | ||
<summary>접기/펼치기 버튼</summary> | ||
<div markdown="1"> | ||
<a href="https://marketstack.com/documentation" target="_blank">Market Stack API</a>(실시간 국내 주가)<br/> | ||
<a href="https://iexcloud.io/docs/api/" target="_blank">IEX OPEN API</a>(실시간 해외 주가)<br/> | ||
<a href="https://upbit.com/service_center/open_api_guide" target="_blank">Upbit Open API</a>(실시간 비트코인 캔들 차트)<br/> | ||
<a href="https://newsapi.org/" target="_blank">News API</a>(국내, 해외 경제관련 뉴스)<br/> | ||
<a href="https://api.qwer.pw/docs/helpful_text" target="_blank">한국 명언 API</a>(한강물 측정기 개발자 분께 직접 API 요청 및 개발)<br/> | ||
<a href="https://api.adviceslip.com/advice" target="_blank">Advice Slip JSON API</a>(해외 명언)<br/> | ||
</div><br/> | ||
</details> | ||
|
||
## Technical Issue | ||
|
||
// 업데이트 예정 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import axios from 'axios'; | ||
|
||
|
||
export async function getBitCandle(bitcoinname :string) { | ||
|
||
const response = await axios.get<BitcoinCandles> ( | ||
`https://api.upbit.com/v1/candles/minutes/1?market=${bitcoinname}&count=200` | ||
|
||
); | ||
|
||
return response.data; | ||
} | ||
|
||
export type BitcoinCandles = BitcoinCandle[] | ||
|
||
export interface BitcoinCandle { | ||
market: string; | ||
candle_date_time_utc: Date; | ||
candle_date_time_kst: Date; | ||
opening_price: number; | ||
high_price: number; | ||
low_price: number; | ||
trade_price: number; | ||
timestamp: number; | ||
candle_acc_trade_price: number; | ||
candle_acc_trade_volume: number; | ||
unit: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import axios from 'axios'; | ||
import {KRStockAPIKEY} from '../key/apikey'; | ||
|
||
export async function getKRStocks(krstock: string) { | ||
|
||
|
||
const response = await axios.get<KRStocks>( | ||
`http://api.marketstack.com/v1/eod?access_key=${KRStockAPIKEY}&symbols=${krstock}.XKRX` | ||
); | ||
|
||
return response.data; | ||
} | ||
|
||
export interface KRStocks { | ||
pagination: Pagination; | ||
data: Datum[]; | ||
} | ||
|
||
export interface Datum { | ||
open: number; | ||
high: number; | ||
low: number; | ||
close: number; | ||
volume: number; | ||
adj_high: null; | ||
adj_low: null; | ||
adj_close: number; | ||
adj_open: null; | ||
adj_volume: null; | ||
split_factor: number; | ||
symbol: Symbol; | ||
exchange: Exchange; | ||
date: string; | ||
} | ||
|
||
export enum Exchange { | ||
Xkrx = "XKRX", | ||
} | ||
|
||
export enum Symbol { | ||
The035420Xkrx = "035420.XKRX", | ||
} | ||
|
||
export interface Pagination { | ||
limit: number; | ||
offset: number; | ||
count: number; | ||
total: number; | ||
} |
Oops, something went wrong.