Skip to content
@Stockly-Project

Stockly-Project

📊 Stockly

banner

📚Table of Contents

👩‍💻 Introduction

EPH(Elevator Pitch Framework)

  • STOCKLY는 주식 투자에 관심이 있지만 시작을 어려워 하는 개인들에게 실전에 가까운 투자 경험과 위험 없는 투자 학습 환경을 제공한다. 더불어 우리는 사용자의 자산을 시각화하여 편리한 자산관리를 돕는다.

기획서

STOCKLY 기획서.pdf

요구사항 정의서

https://docs.google.com/spreadsheets/d/19aW18ExV1BCzs6UfrxL9yfCzEoTpt5gRazA9k0vFh2s/edit?gid=211065193#gid=211065193

기능 명세서

https://docs.google.com/spreadsheets/d/1AiwZ3q3cILC9flWU6uRUhQqEs2Dz1rtel5Zh-Gp1QXU/edit?gid=0#gid=0

프로세스 명세서(액티비티 다이어그램)

https://drive.google.com/file/d/1RCKO13ue1S7Rjw33bm4f2IzVcdGs1_K7/view

연동 정의서

https://docs.google.com/spreadsheets/d/1U215_Mel70mujcQGGkk4Bi_EC_e49PN1USf27GLKk7c/edit?gid=785057080#gid=785057080

🌈 WEB DEMO

온보딩 페이지 회원가입/로그인 페이지
메인 주식 차트 페이지 모의 투자 페이지
default.mp4
알림 페이지 마이 페이지
default.mp4
default.mp4
주식 차트 페이지
1.mp4

🌈 APP DEMO

⚙ System Architecture

🛠 Tech Stack


분야 사용 기술
Fronted                        
             
APP      
Backend                              
DevOps                              
Monitoring                        
etc                              

💾 ERD

Swagger icon Swagger

주식 차트 알림 Producer

image

주식 차트, 알림 Consumer

image

모의투자 Consumer Server

image

⚙ Kafka Workflows

주식 차트 기능

알림 기능

📂 Directory Structure

Web

📦 Web
 ┣ 📂public
 ┃ ┗ 📜vite.svg
 ┣ 📂src
 ┃ ┣ 📂assets
 ┃ ┃ ┣ 📂icons
 ┃ ┃ ┃ ┣ 📜alert.svg
 ┃ ┃ ┃ ┣ 📜alert_hover.svg
 ┃ ┃ ┃ ┣ 📜assets_icon.svg
 ┃ ┃ ┃ ┣ 📜cancel.svg
 ┃ ┃ ┃ ┣ 📜like.svg
 ┃ ┃ ┃ ┣ 📜like2.svg
 ┃ ┃ ┃ ┣ 📜like2_hover.svg
 ┃ ┃ ┃ ┣ 📜like_hover.svg
 ┃ ┃ ┃ ┣ 📜main_logo.svg
 ┃ ┃ ┃ ┣ 📜money_icon.svg
 ┃ ┃ ┃ ┣ 📜profile_icon.svg
 ┃ ┃ ┃ ┣ 📜roi_icon.svg
 ┃ ┃ ┃ ┗ 📜stock_icon.svg
 ┃ ┃ ┣ 📂images
 ┃ ┃ ┃ ┣ 📜CandleImg.png
 ┃ ┃ ┃ ┣ 📜OrderImg.svg
 ┃ ┃ ┃ ┗ 📜blueImg.svg
 ┃ ┃ ┗ 📜react.svg
 ┃ ┣ 📂components
 ┃ ┃ ┣ 📂menuBar
 ┃ ┃ ┃ ┣ 📜AlertList.tsx
 ┃ ┃ ┃ ┣ 📜MenuBar.tsx
 ┃ ┃ ┃ ┣ 📜MenuBarAlertContent.tsx
 ┃ ┃ ┃ ┣ 📜MenuBarChartContent.tsx
 ┃ ┃ ┃ ┣ 📜MenuBarLikeContent.tsx
 ┃ ┃ ┃ ┗ 📜MessageList.tsx
 ┃ ┃ ┣ 📂mypageContent
 ┃ ┃ ┃ ┣ 📜Account.tsx
 ┃ ┃ ┃ ┣ 📜Charge.tsx
 ┃ ┃ ┃ ┣ 📜MyOrderList.tsx
 ┃ ┃ ┃ ┣ 📜MyStockList.tsx
 ┃ ┃ ┃ ┣ 📜OrderList.tsx
 ┃ ┃ ┃ ┣ 📜RoiChart.tsx
 ┃ ┃ ┃ ┗ 📜UserInfo.tsx
 ┃ ┃ ┣ 📂onBoardingContent
 ┃ ┃ ┃ ┣ 📜ExampleMyInvest.tsx
 ┃ ┃ ┃ ┣ 📜OnBoarding1.tsx
 ┃ ┃ ┃ ┣ 📜OnBoarding2.tsx
 ┃ ┃ ┃ ┣ 📜OnBoarding3.tsx
 ┃ ┃ ┃ ┗ 📜OnBoarding4.tsx
 ┃ ┃ ┣ 📂orderContents
 ┃ ┃ ┃ ┣ 📜Buy.tsx
 ┃ ┃ ┃ ┣ 📜BuyLimit.tsx
 ┃ ┃ ┃ ┣ 📜BuyMarket.tsx
 ┃ ┃ ┃ ┣ 📜Order.tsx
 ┃ ┃ ┃ ┣ 📜Sell.tsx
 ┃ ┃ ┃ ┣ 📜SellLimit.tsx
 ┃ ┃ ┃ ┗ 📜SellMarket.tsx
 ┃ ┃ ┣ 📂stockDetails
 ┃ ┃ ┃ ┣ 📜ChartContainer.tsx
 ┃ ┃ ┃ ┣ 📜DayChart.tsx
 ┃ ┃ ┃ ┣ 📜Echart.tsx
 ┃ ┃ ┃ ┣ 📜MinChart.tsx
 ┃ ┃ ┃ ┣ 📜MonthChart.tsx
 ┃ ┃ ┃ ┣ 📜OrderBook.tsx
 ┃ ┃ ┃ ┣ 📜TopContent.tsx
 ┃ ┃ ┃ ┣ 📜WeekChart.tsx
 ┃ ┃ ┃ ┗ 📜YearChart.tsx
 ┃ ┃ ┣ 📜Modal.tsx
 ┃ ┃ ┣ 📜NewAlertContent.tsx
 ┃ ┃ ┣ 📜SearchContent.tsx
 ┃ ┃ ┣ 📜SignIn.tsx
 ┃ ┃ ┣ 📜SignUp.tsx
 ┃ ┃ ┣ 📜StockChartList.tsx
 ┃ ┃ ┗ 📜TopNavBar.tsx
 ┃ ┣ 📂fonts
 ┃ ┃ ┣ 📜Pretendard-Black.ttf
 ┃ ┃ ┣ 📜Pretendard-Bold.ttf
 ┃ ┃ ┣ 📜Pretendard-ExtraBold.ttf
 ┃ ┃ ┣ 📜Pretendard-ExtraLight.ttf
 ┃ ┃ ┣ 📜Pretendard-Light.ttf
 ┃ ┃ ┣ 📜Pretendard-Medium.ttf
 ┃ ┃ ┣ 📜Pretendard-Regular.ttf
 ┃ ┃ ┣ 📜Pretendard-SemiBold.ttf
 ┃ ┃ ┗ 📜Pretendard-Thin.ttf
 ┃ ┣ 📂hooks
 ┃ ┃ ┣ 📜AlertMessageData.tsx
 ┃ ┃ ┣ 📜DataWorker.js
 ┃ ┃ ┗ 📜RealTimeData.tsx
 ┃ ┣ 📂pages
 ┃ ┃ ┣ 📜LoginPage.tsx
 ┃ ┃ ┣ 📜MainPage.tsx
 ┃ ┃ ┣ 📜MypagePage.tsx
 ┃ ┃ ┣ 📜OnBoardingPage.tsx
 ┃ ┃ ┗ 📜StockDetailsPage.tsx
 ┃ ┣ 📂routes
 ┃ ┃ ┣ 📜GuestRoute.tsx
 ┃ ┃ ┗ 📜ProtectedRoute.tsx
 ┃ ┣ 📂types
 ┃ ┃ ┗ 📜NewStockData.ts
 ┃ ┣ 📂zustand
 ┃ ┃ ┣ 📜AlertStore.tsx
 ┃ ┃ ┣ 📜ChartListStore.tsx
 ┃ ┃ ┣ 📜MarketStore.tsx
 ┃ ┃ ┣ 📜MenuBarStore.tsx
 ┃ ┃ ┣ 📜TopNavBarStore.tsx
 ┃ ┃ ┗ 📜UserStore.tsx
 ┃ ┣ 📜.DS_Store
 ┃ ┣ 📜App.css
 ┃ ┣ 📜App.tsx
 ┃ ┣ 📜index.css
 ┃ ┣ 📜main.tsx
 ┃ ┗ 📜vite-env.d.ts
 ┣ 📜.DS_Store
 ┣ 📜.eslintrc.js
 ┣ 📜.prettierrc
 ┣ 📜README.md
 ┣ 📜build.sh
 ┣ 📜eslint.config.js
 ┣ 📜index.html
 ┣ 📜package-lock.json
 ┣ 📜package.json
 ┣ 📜tailwind.config.js
 ┣ 📜tsconfig.app.json
 ┣ 📜tsconfig.json
 ┣ 📜tsconfig.node.json
 ┣ 📜vercel.json
 ┗ 📜vite.config.ts

App


Stock-Producer-Server

📦Stock-Producer-Server
 ┣ 📂.github
 ┃ ┣ 📂ISSUE_TEMPLATE
 ┃ ┃ ┣ 📜♻️-refactor.md
 ┃ ┃ ┣ 📜✨-feature.md
 ┃ ┃ ┣ 📜🐛-bug.md
 ┃ ┃ ┗ 📜🛠️-setting.md
 ┃ ┣ 📂workflows
 ┃ ┃ ┗ 📜ci.yml
 ┃ ┗ 📜pull_request_template.md
 ┣ 📂src
 ┃ ┣ 📂alert
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜crud.py
 ┃ ┃ ┣ 📜routes.py
 ┃ ┃ ┗ 📜schemas.py
 ┃ ┣ 📂common
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜admin_kafka_client.py
 ┃ ┃ ┣ 📜kis_configs.py
 ┃ ┃ ┗ 📜producer.py
 ┃ ┣ 📂order
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜order_book_ws.py
 ┃ ┃ ┣ 📜routes.py
 ┃ ┃ ┣ 📜schemas.py
 ┃ ┃ ┗ 📜service.py
 ┃ ┣ 📂stock
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜crud.py
 ┃ ┃ ┣ 📜faust_models.py
 ┃ ┃ ┣ 📜price_websocket.py
 ┃ ┃ ┣ 📜routes.py
 ┃ ┃ ┣ 📜schemas.py
 ┃ ┃ ┗ 📜websocket.py
 ┃ ┣ 📂user
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜crud.py
 ┃ ┃ ┣ 📜routes.py
 ┃ ┃ ┗ 📜schemas.py
 ┃ ┣ 📜__init__.py
 ┃ ┣ 📜configs.py
 ┃ ┣ 📜database.py
 ┃ ┣ 📜logger.py
 ┃ ┣ 📜main.py
 ┃ ┗ 📜requirements.txt
 ┣ 📜.env
 ┣ 📜.gitignore
 ┣ 📜Dockerfile
 ┣ 📜README.md
 ┣ 📜build.sh
 ┣ 📜docker-compose.yml
 ┣ 📜init.sql
 ┗ 📜my.cnf

Stock-Consumer-Server

📦Stock-Consumer-Server
 ┣ 📂.github
 ┃ ┣ 📂ISSUE_TEMPLATE
 ┃ ┃ ┣ 📜♻️-refactor.md
 ┃ ┃ ┣ 📜✨-feature.md
 ┃ ┃ ┣ 📜🐛-bug.md
 ┃ ┃ ┗ 📜🛠️-setting.md
 ┃ ┣ 📂workflows
 ┃ ┃ ┗ 📜ci.yml
 ┃ ┗ 📜pull_request_template.md
 ┣ 📂src
 ┃ ┣ 📂alert
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜crud.py
 ┃ ┃ ┣ 📜routes.py
 ┃ ┃ ┗ 📜service.py
 ┃ ┣ 📂faust_app
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜app.py
 ┃ ┃ ┣ 📜models.py
 ┃ ┃ ┗ 📜sse.py
 ┃ ┣ 📂stock
 ┃ ┃ ┣ 📜__init__.py
 ┃ ┃ ┣ 📜crud.py
 ┃ ┃ ┣ 📜routes.py
 ┃ ┃ ┗ 📜service.py
 ┃ ┣ 📜__init__.py
 ┃ ┣ 📜consumer.py
 ┃ ┣ 📜database.py
 ┃ ┣ 📜logger.py
 ┃ ┣ 📜main.py
 ┃ ┣ 📜producer.py
 ┃ ┗ 📜requirements.txt
 ┣ 📜.env
 ┣ 📜.gitignore
 ┣ 📜Dockerfile
 ┣ 📜README.md
 ┣ 📜build.sh
 ┗ 📜docker-compose.yml

Order-Consumer-Server

📦Order-Consumer-Server
 ┣ 📂.github
 ┃ ┣ 📂ISSUE_TEMPLATE
 ┃ ┃ ┣ 📜♻️-refactor.md
 ┃ ┃ ┣ 📜✨-feature.md
 ┃ ┃ ┣ 📜🐛-bug.md
 ┃ ┃ ┗ 📜🛠️-setting.md
 ┃ ┣ 📂workflows
 ┃ ┃ ┗ 📜ci.yml
 ┃ ┗ 📜pull_request_template.md
 ┣ 📂src
 ┃ ┣ 📜consumer.py
 ┃ ┣ 📜database.py
 ┃ ┣ 📜logger.py
 ┃ ┣ 📜main.py
 ┃ ┣ 📜requirements.txt
 ┃ ┣ 📜routes.py
 ┃ ┣ 📜schemas.py
 ┃ ┗ 📜service.py
 ┣ 📜.env
 ┣ 📜.gitignore
 ┣ 📜Dockerfile
 ┣ 📜README.md
 ┣ 📜build.sh
 ┗ 📜docker-compose.yml

.ENV icon Environment

  • backend/.env
MYSQL_ROOT_PASSWORD=
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_HOST=

REDIS_URL=

# 한국 투자 증권 앱 키 
APP_KEY=
APP_SECRET=
SSE_KEY=
SSE_SECRET=
HOGA_KEY=
HOGA_SECRET=

🚀 How to Start

App

flutter pub get # 패키지 설치

flutter run # 디버그 모드로 실행

flutter build apk # APK 빌드

flutter clean # 빌드 캐시 정리 

Web

npm install

npm run dev

backend

# Docker Desktop 실행 -> Settings -> Kubernetes -> Enable Kubernetes

# Kubernetes, helm 설치 
brew install kubectl
brew install helm

# 트래픽 활성화
helm repo add traefik https://helm.traefik.io/traefik
helm repo update
helm install traefik traefik/traefik --namespace kube-system --set "dashboard.enabled=true" --set "service.type=LoadBalancer"

# 로컬에서 트래픽 사용을 위한 설정
sudo nano /etc/hosts

127.0.0.1   localhost.stock-service
127.0.0.1   localhost.stock-server
127.0.0.1   localhost.order-service
127.0.0.1   traefik.internal

127.0.0.1   localhost.traefik
127.0.0.1   localhost.kafka
127.0.0.1   localhost.zookeeper
127.0.0.1   localhost.argocd

# 위의 내용을 복사, 붙여넣기 후 저장 

# 네임스페이스 생성
kubectl create namespace stockly
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# argoCD 실행
kubectl apply -f argoCD/app.yaml

# argoCD 접속
kubectl port-forward svc/argocd-server -n argocd 8080:443
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo # 비밀번호 화인 명령어(아이디는 Admin)

💡 Monitoring

Popular repositories Loading

  1. Backend Backend Public

    Python

  2. Monitoring Monitoring Public

  3. K3s-Infra K3s-Infra Public

    Shell

  4. Order-Service Order-Service Public

    Python

  5. Stock-Service Stock-Service Public

    Python

  6. Frontend Frontend Public

    TypeScript

Repositories

Showing 8 of 8 repositories
  • Frontend Public
    Stockly-Project/Frontend’s past year of commit activity
    TypeScript 0 0 0 0 Updated Dec 13, 2024
  • Stock-Service Public
    Stockly-Project/Stock-Service’s past year of commit activity
    Python 0 0 0 0 Updated Dec 13, 2024
  • K3s-Infra Public
    Stockly-Project/K3s-Infra’s past year of commit activity
    Shell 0 0 0 0 Updated Dec 13, 2024
  • Order-Service Public
    Stockly-Project/Order-Service’s past year of commit activity
    Python 0 0 0 0 Updated Dec 13, 2024
  • .github Public
    Stockly-Project/.github’s past year of commit activity
    0 0 0 0 Updated Dec 11, 2024
  • Backend Public
    Stockly-Project/Backend’s past year of commit activity
    Python 0 0 0 0 Updated Dec 11, 2024
  • FrontendApp Public
    Stockly-Project/FrontendApp’s past year of commit activity
    Dart 0 0 0 0 Updated Dec 3, 2024
  • Monitoring Public
    Stockly-Project/Monitoring’s past year of commit activity
    0 0 0 0 Updated Oct 14, 2024

Top languages

Loading…

Most used topics

Loading…