This GitHub project, created by Vadim and Andrej as part of our coursework in the "WEB Application Development Tools" subject at TSI, is designed to showcase our skills and knowledge in web application development.
This project reflects our teamwork and collaboration skills, as we've worked together to bring our ideas to life and overcome challenges along the way.
We hope that this repository serves as a valuable resource for fellow students and anyone interested in web application development. Feel free to explore our code, documentation, and share your feedback or questions. Thank you for visiting our project!
The backend of our application is written in Golang and serves as the foundation for data retrieval. To ensure the backend functions properly, you'll need to have the Golang runtime installed on your system. If you haven't installed it yet, please refer to the official Golang documentation for installation instructions.
To change the server's port, you can use an environment variable.
On Linux or MacOS, open your terminal and use the following command:
export SERVER_PORT=:8081 // default port 8080On Windows, you can set the environment variable with the following command:
set SERVER_PORT=:8081 // default port 8080To initiate the backend server navigate to backend page and run following command:
go run main.goThis command handles the automatic installation of all required dependencies and launches the server. The server will be accessible at http://localhost:8080.
GET
SSE
/posts/search - Search for posts
| Name | Type | In | Require | Description |
|---|---|---|---|---|
query |
string |
query | + | The name of the post you want to search for. |
sources |
string[] |
query | - | Specify sources to search from. |
pp_page |
number |
query | - | Page number for pp.lv. |
ss_page |
number |
query | - | Page number for ss.lv. |
facebook_page |
number |
query | - | Page number for facebook.com. |
banknote_page |
number |
query | - | Page number for banknote.lv. |
| Name | Description | Response |
| posts | This event partially sends posts from a single page. |
[
{
title: string,
preview_img: string,
price: string,
url: string,
},
// ... more posts
] |
| pagination | This event dispatches once after a page has been scraped. |
{
source: string,
has_next: boolean,
} |
| close | This event dispatches when the scraping process is complete. The connection will be closed. |
"Connection closed" |
The frontend of our application is powered by JavaScript and utilizes the Nuxt.js framework to run the frontend server. To ensure seamless operation, you'll need to have a JavaScript runtime installed on your system. Depending on your preference, you can choose one of the following JavaScript runtimes:
Before you can get started with the frontend, you must install the necessary dependencies. You can do this using your preferred package manager:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun installThis command will install all the required dependencies for the frontend portion of the application. You can then either run development server or build the production server.
To start the development server and work on your frontend code, run the following command:
# npm
npm run dev
# pnpm
pnpm run dev
# yarn
yarn dev
# bun
bun run devThis will launch a development server at http://localhost:3000, allowing you to make changes and see them in real-time.
When you're ready to prepare your application for production deployment, follow these steps:
To build the application for production, execute the following command:
# npm
npm run build
# pnpm
pnpm run build
# yarn
yarn build
# bun
bun run buildThis command will compile and optimize your code for production use.
If you want to preview the production build locally before deployment, use the following command:
# npm
npm run preview
# pnpm
pnpm run preview
# yarn
yarn preview
# bun
bun run previewThis will allow you to view and test your production-ready application on your local machine, ensuring everything is working as expected before deploying it to a production server.
This project is open-source and available under the MIT License. You are free to use, modify, and distribute the code as per the terms of the license. Please review the full license text for more details.