{"id":23041307,"url":"https://github.com/anond0rf/vecchioserver","last_synced_at":"2025-04-03T00:40:51.081Z","repository":{"id":258807606,"uuid":"872694058","full_name":"anond0rf/vecchioserver","owner":"anond0rf","description":"VecchioServer is a RESTful server for posting on vecchiochan.com","archived":false,"fork":false,"pushed_at":"2024-10-26T20:44:15.000Z","size":202,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T14:45:12.360Z","etag":null,"topics":["echo","echo-framework","go","golang","imageboard","rest","rest-api","restful-api","vecchiochan","vecchioserver","vichan"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anond0rf.png","metadata":{"files":{"readme":"README-en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-14T22:45:40.000Z","updated_at":"2024-10-26T20:44:19.000Z","dependencies_parsed_at":"2024-10-26T21:42:14.766Z","dependency_job_id":null,"html_url":"https://github.com/anond0rf/vecchioserver","commit_stats":null,"previous_names":["anond0rf/vecchioserver"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anond0rf%2Fvecchioserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anond0rf%2Fvecchioserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anond0rf%2Fvecchioserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anond0rf%2Fvecchioserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anond0rf","download_url":"https://codeload.github.com/anond0rf/vecchioserver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916739,"owners_count":20854511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["echo","echo-framework","go","golang","imageboard","rest","rest-api","restful-api","vecchiochan","vecchioserver","vichan"],"created_at":"2024-12-15T19:32:23.702Z","updated_at":"2025-04-03T00:40:51.057Z","avatar_url":"https://github.com/anond0rf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n[![English](https://img.shields.io/badge/lang-en-blue.svg)](README-en.md) [![Italiano](https://img.shields.io/badge/lang-it-blue.svg)](README.md) \n![License](https://img.shields.io/github/license/anond0rf/vecchioserver) [![GitHub Release](https://img.shields.io/github/v/release/anond0rf/vecchioserver?label=release)](https://github.com/anond0rf/vecchioserver/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/anond0rf/vecchioserver)](https://goreportcard.com/report/github.com/anond0rf/vecchioserver) [![Go Version](https://img.shields.io/github/go-mod/go-version/anond0rf/vecchioserver)](https://github.com/anond0rf/vecchioserver)\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/anond0rf/vecchioserver\"\u003e\n    \u003cimg src=\"logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\u003ch3 align=\"center\"\u003eVecchioServer\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cstrong\u003eVecchioServer\u003c/strong\u003e is a RESTful server for posting on \u003ca href=\"https://vecchiochan.com/\"\u003evecchiochan.com\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"#download\"\u003e\u003cstrong\u003eGet Started »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/anond0rf/vecchioserver/releases\"\u003eReleases\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/anond0rf/vecchioserver/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/anond0rf/vecchioserver/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Features\n\nVecchioServer exposes an API that follows the OpenAPI specification and includes a Swagger UI for easy testing and documentation.  \nThe server abstracts away the details of form submission and request handling through the use of [vecchioclient](https://github.com/anond0rf/vecchioclient).  \nThrough the exposed `/thread` and `/reply` endpoints you can:  \n\n- Create new threads on specific boards\n- Reply to existing threads\n\nCustom server port, as well as custom `User Agent` header to be used by the internal client and verbose logging are all supported (see [Running the Server](#running-the-server)).  \nNo read functionality is provided as NPFchan already exposes the vichan  [API](https://github.com/vichan-devel/vichan-API/).  \n\n## Table of Contents\n\n1. [Download](#download)\n2. [Running the Server](#running-the-server)\n3. [Swagger API Documentation](#swagger-api-documentation)\n4. [Usage](#usage)\n    - [Creating a Thread](#creating-a-thread)\n    - [Posting a Reply](#posting-a-reply)\n5. [Building the Project](#building-the-project)\n6. [License](#license)\n\n## Download\n\nVecchioServer is available for Windows, GNU/Linux and MacOS.  \nBinaries for the latest release can be downloaded [here](https://github.com/anond0rf/vecchioserver/releases).\n\n## Running the Server\n\nFor simplicity, we assume `vecchioserver` to be the name of the executable.\nTo run the server:\n\n```powershell\n# windows\nvecchioserver\n```\n```sh\n# linux / macos\n./vecchioserver\n```\n\nThe following flags are available:\n\n- `-p` or `--port`: Custom port to run the server on (default: `8080`).  \n- `-u` or `--user-agent`: Custom User-Agent header to be used by the internal client.  \n- `-v` or `--verbose`: Enables verbose logging for detailed logs.  \n\nExample:\n\n```powershell\n# windows\nvecchioserver -p 9000 -u \"MyCustomAgent\" -v\n```\n\nThe server will now run on port `9000`, use \"MyCustomAgent\" as the `User-Agent` HTTP header in the internal client, and enable verbose logging.  \n\n## Swagger API Documentation\n\nOnce the server is running, you can access the Swagger documentation at:\n\n```\nhttp://localhost:8080/swagger/index.html\n```\n\nThis provides a user-friendly UI for exploring the API and testing out requests.\n\n## Usage\n\nHere are some examples of how to use the API.  \nPort is assumed to be default (`8080`).  \nRefer to the swagger `Schemas` section of the documentation to view all the available fields and their description.  \nNon-mandatory fields can be omitted as done in the below examples.\n\n- #### Creating a Thread\n\n  Creating a thread can be done by sending a `POST` request to the `/thread` endpoint:\n\n  ```bash\n  curl -X 'POST' \\\n    'http://localhost:8080/thread' \\\n    -H 'accept: application/json' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n    \"board\": \"b\",\n    \"body\": \"This is a new thread on board /b/\",\n    \"files\": [\n      \"C:\\\\path\\\\to\\\\file.jpg\"\n    ]\n  }'\n  ```\n\n  **board** is the only **mandatory** field but keep in mind that, as the settings vary across boards, more fields are probably required for posting (e.g. you can't post a new thread with no embed nor files on /b/).  \n\n- #### Posting a Reply\n\n  Posting a reply can be done by sending a `POST` request to the `/reply` endpoint:\n\n  ```bash\n  curl -X 'POST' \\\n    'http://localhost:8080/reply' \\\n    -H 'accept: application/json' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n    \"board\": \"b\",\n    \"body\": \"This is a new reply to thread #1 of board /b/\",\n    \"files\": [\n      \"C:\\\\path\\\\to\\\\file1.mp4\",\n      \"C:\\\\path\\\\to\\\\file2.webm\"\n    ],\n    \"thread\": 1\n  }'\n  ```\n\n  **board** and **thread** are the only **mandatory** fields but keep in mind that, as the settings vary across boards, more fields are probably required for replying.\n\n## Building the Project\n\nTo build the project:\n\n1. Make sure you have [Go](https://golang.org/dl/) installed.\n2. Clone the repository with [git](https://github.com/git/git):\n\n   ```sh\n   git clone https://github.com/anond0rf/vecchioserver.git\n   ```\n3. Change directory to the project folder:\n\n   ```sh\n   cd vecchioserver\n   ```\n\n4. **Optional**: if you intend to modify the `api/openapi.yaml` file, you need to install  [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) and run the following command to regenerate the OpenAPI types, server and specification:\n\n   ```sh\n   oapi-codegen -generate types,server,spec -o internal/handlers/server.gen.go -package handlers api/openapi.yaml\n   ```\n\n5. Build the project:\n\n   ```sh\n   go build ./cmd/vecchioserver\n   ```\n\nAn executable file will be produced in the root of the project.\n\n## License\n\nVecchioServer is licensed under the [LGPL-3.0 License](https://www.gnu.org/licenses/lgpl-3.0.html).  \n\nThis means you can use, modify, and distribute the software, provided that any modified versions are also licensed under the LGPL-3.0.  \n\nFor more details, please see the full text of the license in the [LICENSE](./LICENSE) file.  \n\nCopyright © 2024 anond0rf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanond0rf%2Fvecchioserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanond0rf%2Fvecchioserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanond0rf%2Fvecchioserver/lists"}