/sogang-register-server

sogang-register rest api server

Primary LanguagePython

🏫 Sogang-Register Server

service-logo

μ„œκ°•λŒ€ν•™κ΅ κ°œμ„€κ΅κ³Όλͺ© 정보 쑰회 μ„œλΉ„μŠ€μ˜ λ°±μ—”λ“œ μ„œλ²„ μž…λ‹ˆλ‹€.

항상 μ‹œκ°„ν‘œλ₯Ό 짜기 μ „, μˆ˜κ°•μ‹ μ²­μ„ ν•˜κΈ° μ „ λ“€μ–΄κ°€λŠ” 'κ°œμ„€κ΅κ³Όλͺ©μ •λ³΄ μ‚¬μ΄νŠΈ'λ₯Ό μ‚¬μš©ν•˜λ©° 느꼈던 λ¬Έμ œμ λ“€μ„ μ‘°κΈˆμ΄λ‚˜λ§ˆ κ°œμ„ ν•˜κΈ° μœ„ν•΄ μ‹œμž‘ν•˜κ²Œ 된 μ„œλΉ„μŠ€μž…λ‹ˆλ‹€.

μ—¬λŸ¬ REST APIλ₯Ό μ œκ³΅ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

πŸ”§ Tech Stack

Infra

Git Docker

REST API

Python Flask Swagger Linux AWS EC2 JWT

Database

MySQL AWS RDS

Crawler

Python Pandas Selenium BeautifulSoup

πŸ”§ Proejct Setup / and Organization

Project structure

functional structure ꡬ쑰λ₯Ό μ‚¬μš©ν•˜μ—¬ μ–΄λ–€ λ™μž‘μ„ ν•˜λŠ”μ§€μ— 따라 파일 ꡬ쑰λ₯Ό κ΅¬λΆ„ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

We used functional structure to organize the files of the project by what they do.

.
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main
β”‚   β”‚   β”œβ”€β”€ config.py
β”‚   β”‚   β”œβ”€β”€ controller
β”‚   β”‚   β”‚   └── __init__.py
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ model
β”‚   β”‚   β”‚   └── __init__.py
β”‚   β”‚   └── service
β”‚   β”‚       └── __init__.py
β”‚   └── test
β”‚       └── __init__.py
β”œβ”€β”€ manage.py
└── requirements.txt

Install required packages

μ‚¬μš©ν•œ νŒ¨ν‚€μ§€λ“€μ€ requirements.txt 에 μ„ μ–Έλ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

pip install -r requirements.txt

Config settings

here is an example:

import os

host_name = 'yourhostname.com'
username = "name"
password = "password"
database_name = "your database name"

base_dir = os.path.abspath(os.path.dirname(__file__))

class Config(object):
  SECRET_KEY = 'your secret key'
  algo = 'HS256'
  DEBUG = False
  
class DevelopmentConfig(Config):
  SQLALCHEMY_DATABASE_URI = 'your databae url'
  DEBUG = True
  SQLALCHEMY_TRACK_MODIFICATIONS = False

class ProductionConfig(Config):
  SQLALCHEMY_DATABASE_URI = 'your database url'
  DEBUG = False
  SQLALCHEMY_TRACK_MODIFICATIONS = False

config_by_name = dict(
  dev=DevelopmentConfig,
  prod=ProductionConfig,
) 

key = Config.SECRET_KEY
algorithm = Config.algo

mailConfig = ['youremail@email.com','email-password']

Build

# $(pwd) = project root directory
docker build -t yourdockerusername/dockerfilename .

Run

docker run -dp 5000:5000 yourdockerusername/dockerfilename

πŸ“ƒ API List

Auth

  • Create account
  • Request Secret Code to User Email
  • Confirm Secret Code
  • Login
  • Logout
  • Search User Email
  • Password Reset
  • Password Change
  • User withdrawal

User

  • Get User Favorite Subjects
  • Register Favorite subjects
  • Get User completed subjects
  • Register completed subjects
  • Delete Favorite Subjects
  • Delete Completed Subjects
  • Send report(Q&A) to our team

Search

  • Search all Subjects
  • Search all Department at Selected Semester
  • Search all Subjects by Search Options
  • Search Updated Time

πŸ“ž Contact us

κΉ€μŠΉμš° : seungwookim99

κΉ€ν˜„μž¬ : itsnowkim