You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spirit is the primary implementation of the Spacebin Server, written in Go and maintained by the Orca Group. Spacebin itself is a standardized pastebin server, that's capable of serving notes, novels, code or any other form of text!
14
+
Spacebin is a modern Pastebin server implemented in Go and maintained by Luke Whritenour. It is capable of serving notes, novels, code, or any other form of text! Spacebin was designed to be fast and reliable, avoiding the problems of many current pastebin servers. Spacebin features JavaScript-based text highlighting, but works completely fine with JS disabled. Besides text highlighting, we have many more features in the works. It is entirely self-hostable, and available in a Docker image.
15
15
16
-
Pastebin's are a type of online content storage service where users can store plain text document, e.g. program source code. For more information and the history of Pastebin see Wikipedia's [article on them](https://en.wikipedia.org/wiki/Pastebin).
16
+
Pastebins are a type of online content storage service where users can store plain text document, e.g. program source code. For more information and the history of Pastebin see Wikipedia's [article on them](https://en.wikipedia.org/wiki/Pastebin).
17
17
18
18
## Table of Contents
19
19
20
-
-[🚀 Spirit](#-spirit)
20
+
-[🚀 Spacebin](#-spacebin)
21
21
-[Table of Contents](#table-of-contents)
22
22
-[Documentation](#documentation)
23
23
-[Self-hosting](#self-hosting)
@@ -49,7 +49,7 @@ WIP
49
49
50
50
#### On the Web
51
51
52
-
To use Spacebin on the web, our team provides a web app written in [Svelte](https://svelte.dev): [Pulsar](https://github.com/orca-group/pulsar). A public instance of Spacebin using this client is available at [https://spaceb.in](https://spaceb.in) (the `/api`route can be used to access Spirit itself).
52
+
To use Spacebin on the web, our team provides a web app. You can access the web app at [spaceb.in](https://spaceb.in). You must use `https://spaceb.in/api` to access the API routes.
53
53
54
54
#### CLI
55
55
@@ -58,26 +58,67 @@ Since Spirit supports `multipart/form-data` uploads, it's extremely easy to use
Work in progress. Check out the documentation website: [docs.spaceb.in](https://docs.spaceb.in).
72
+
There are three primary API routes to: create a document, fetch a documents text content in JSON format, and fetch a documents **plain text** content.
73
+
74
+
*`/api/`: Create Document
75
+
* Accepts JSON and multipart/form-data
76
+
* For both formats, include document content in a `content` field
77
+
* Only accepts POST requests
78
+
* Instances are able to specify a maximum document length.
79
+
*`spaceb.in` uses a 4MB maximum size.
80
+
* Successful requests return a JSON body with the following format:
81
+
```json
82
+
{
83
+
"error": "",
84
+
"payload": {
85
+
"id": "WfwKGJfs",
86
+
"content": "hello",
87
+
"created_at": "2023-08-06T00:01:33.143532-04:00",
88
+
"updated_at": "2023-08-06T00:01:33.143532-04:00"
89
+
}
90
+
}
91
+
```
92
+
*`/api/{document}`: Fetch Document
93
+
*`{document}` = Document ID
94
+
* Document ID lengths vary between instances. For `spaceb.in`, they will be exactly characters.
95
+
*
96
+
* Upon successful request, returns a JSON body with the following format:
97
+
```json
98
+
{
99
+
"error": "",
100
+
"payload": {
101
+
"id": "WfwKGJfs",
102
+
"content": "hello",
103
+
"created_at": "2023-08-06T00:01:33.143532-04:00",
104
+
"updated_at": "2023-08-06T00:01:33.143532-04:00"
105
+
}
106
+
}
107
+
```
108
+
*`/api/{document}/raw`: Fetch Document - Raw
109
+
*`{document}` = Document ID
110
+
* Document ID lengths vary between instances. For `spaceb.in`, they will be exactly 8 characters
111
+
* Returns a `plain/text` file containing the content of the document.
112
+
113
+
There are two additional non-API routes that are documented: `/ping`: returns a 200 OK if the service is online, and `/config`: returns a JSON body with the instances configuration settings.
73
114
74
115
## Credits
75
116
76
-
Spacebin (and Spirit) is a project by Luke Whritenour, associated with the [Orca Group](https://github.com/orca-group)—a developer collective. Spirit was forked from [hastebin](https://github.com/toptal/haste-server) by John Crepezzi (now managed by Toptal), and although it no longer contains **any** code from the original we'd like to thank him regardless. Spirit itself is built using [Chi](https://github.com/go-chi/chi), and [pq](https://github.com/lib/pq), [Ozzo Validation](https://github.com/go-ozzo/ozzo-validation), [Cron](https://github.com/robfig/cron), [env](https://github.com/caarlos0/env), and (of course) [Go](https://go.dev/) itself!
117
+
Spacebin (and all other associated programs) is a project designed and maintained by Luke Whritenour. Spirit was forked from [hastebin](https://github.com/toptal/haste-server) by John Crepezzi (now managed by Toptal), and although it no longer contains **any** code from the original we'd like to thank him regardless. Spirit itself is built using [Chi](https://github.com/go-chi/chi), and [pq](https://github.com/lib/pq), [Ozzo Validation](https://github.com/go-ozzo/ozzo-validation), [Cron](https://github.com/robfig/cron), [env](https://github.com/caarlos0/env), and (of course) [Go](https://go.dev/) itself!
77
118
78
119
You can see a full list of code contributors to Spirit [here, on Github](https://github.com/orca-group/spirit/graphs/contributors).
79
120
80
-
Additionally, we'd like to thank [@uwukairi](https://github.com/uwukairi) for designing our logo/brand.
121
+
Additionally, we'd like to thank [@jackdorland](https://github.com/jackdorland) for designing our logo/brand.
0 commit comments