Skip to content

Commit 0187731

Browse files
committed
2 parents 1e5374b + bf04615 commit 0187731

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

src/app/contributing/page.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export const metadata = {
2+
title: 'Contributing',
3+
description:
4+
'A getting started guide for those wanting to get into Drop development.',
5+
}
6+
7+
# Contributing
8+
9+
As an open-source project, we welcome and encourage contributions.
10+
11+
We use the GitHub model of contributions. Briefly, you fork the project, commit to your private copy, and open a PR to have your changes merged back into the project. You can read more about this process here: [GitHub - Using Pull Requests](https://help.github.com/articles/using-pull-requests).
12+
13+
## Policy
14+
15+
### Generative AI
16+
17+
We have a **no-AI contributions policy**. This is because, generally speaking, LLMs generate code that, while may work, is poorly organised and difficult to maintain.
18+
19+
If you're curious, you can read Asahi Linux's reasons for denying AI contributions: [Asahi Linux - Generative AI](https://asahilinux.org/docs/project/policies/slop/). While not all reasons apply to Drop, it outlines why AI does not replace actual developers in its current form.
20+
21+
## Internals
22+
23+
The rest of this guide is intended to introduce developers to some of the internal structures and patterns we use inside of the Drop server. This guide assumes you've set up the development environment properly, and everything is working.
24+
25+
<Note>
26+
This guide may be out-of-date, and was last updated on 8th September 2025.
27+
</Note>
28+
29+
## Database
30+
31+
We use the [Prisma ORM](https://www.prisma.io/) as the main mechanism by which we access database tables. It's accessed by the global `prisma` object that you can import on any server route, and it provides each table as a typed API to CRUD rows on that table.
32+
33+
For example, to fetch all users on the instance, use:
34+
35+
```typescript
36+
import prisma from '~/server/internal/db/database'
37+
// ...
38+
const users = await prisma.user.findMany({})
39+
```
40+
41+
## Objects
42+
43+
We use a provider-based system for objects, that provide a series of utility functions depending on how you need to manipulate them. Although we currently only support file-system objects, keep in mind that we intend to seamlessly support S3 and other network file protocols.
44+
45+
Objects can be managed using the globally-importable object `objectHandler`. Note that functions that check permissions are separate from those who don't, so ensure that you are using the right one for security reasons.
46+
47+
## `internal` vs `api`
48+
49+
We like to keep `api` routes to a minimum - all heavy logic should be done in a module in `internal`.
50+
51+
We use a... loose naming convention internally for modules.
52+
53+
- `...Handler` is an abstraction over providers that provide the data
54+
- `...Manager` manages the data itself.

src/components/Navigation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ export const navigation: Array<NavGroup> = [
262262
{ title: 'Web API', href: '/guides/web' },
263263
{ title: 'Client API', href: '/guides/client' },
264264
{ title: 'Plugins', href: '/guides/plugins' },
265+
{ title: 'Contributing', href: '/contributing' },
265266
],
266267
},
267268
{

0 commit comments

Comments
 (0)