https://github.com/yuankai619/keelungsightviewer
The website about Keelung city sights
https://github.com/yuankai619/keelungsightviewer
docker jsoup mvc-architecture tailwindcss
Last synced: 3 months ago
JSON representation
The website about Keelung city sights
- Host: GitHub
- URL: https://github.com/yuankai619/keelungsightviewer
- Owner: Yuankai619
- Created: 2024-07-07T20:45:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-17T20:54:49.000Z (over 1 year ago)
- Last Synced: 2024-11-07T10:43:31.791Z (about 1 year ago)
- Topics: docker, jsoup, mvc-architecture, tailwindcss
- Language: CSS
- Homepage: https://keelung-sight-viewer.yuankai.org/
- Size: 30.7 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keelung sithgt viewer
A responsive website about the Keelung city famous tourist spot.
Use a web crawler to scrape [TravelKing](https://www.travelking.com.tw/tourguide/taiwan/keelungcity/) as a source of content.
## Demo
https://keelung-sight-viewer.yuankai.org/
## Tech Stack
**Client :** `Html` `TailwindCSS` `javascript`
**Server :** `Java` `Spring boot` `Jsoup`
**Database :** `MonogoDB(Atlas)`
**Deploy :** `Docker`
## Environment Variables
To run this project, you will need to add the following environment variables to your .env file
`DB_PASSWORD` : the database password in Atlas
`DB_NAME` : the database name in Atlas
`PORT` : the port to run
## Run Locally
Clone the project
```bash
git clone https://github.com/Yuankai619/KeelungSightViewer.git
```
Go to the project directory
```bash
cd KeelungSightViewer
```
Install backend dependencies
```bash
gradle clean build
```
Install frontend pakage
```bash
cd src/main/frontend
npm install
npm run build watch
```
## Run on Docker
**To run this project with docker, you can pull my docker image from docker hub**
Docker Pull Command
```bash
docker pull yuankai619/keelungsightviewer
```
Run with docker container
```bash
docker container run -d -p:8080:8080 -e DB_PASSWORD={your_password} DB_NAME={your_name} PORT=8080 --name {your container name}
```
## Deployment
I deploy to my self-host server by Github Actions
## API Reference
#### Get sights by zone
```http
GET /SightAPI?{zone}
```
| Parameter | Type | Description |
| :-------- | :------- | :---------------------------------- |
| `zone` | `string` | **Required**. the zone about sights |
#### Get sights by category
```http
GET /SightCategoryAPI?{category}
```
| Parameter | Type | Description |
| :--------- | :------- | :-------------------------------------- |
| `category` | `string` | **Required**. the category about sights |
#### Insert one default Sight in Database
```http
POST /InsertTestSight
```
#### clear all default Sight in Database
```http
Delete /ClearTestSight
```