Skip to content

Commit

Permalink
chore: update README and contributors guide
Browse files Browse the repository at this point in the history
  • Loading branch information
minenwerfer committed Dec 14, 2024
1 parent b44b5ae commit 9be147b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
22 changes: 16 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
# Contributing Guide

Thank you for considering Aeria. We encourage and appreciate all contributions to the project in every form possible (code, support, documentation, etc). This page will guide you through best practices and instructions on how to contribute properly and get your contributions accepted by the community.
First of all, we thank very much anyone who whishes to contribute to Aeria. Without you, keeping the project wouldn't be possible.
Although every contribution is more than welcome, there are a few practices that help keeping the code consistent, maintenable, and without bugs. We ask you to go over this 2-minutes read before opening your first PR.

## General good practices
## Philosophy

- Keep the codebase small (ideally smaller than 10k lines of code)
- Catch up with latest versions of NodeJS and dependencies
- **DON'T add new features**, unless it is extremelly needed
- Keep the code small, elegant, and pleasant to read
- Use as few dependencies as possible
- Don't create new features unless it's extremelly important
- Catch up with latest versions of NodeJS and dependencies
- For more meaningful changes, open an issue first
- Always write tests for meaningful changes

## Technical good practices

- Don't create classes, use higher order functions to emulate class state instead
ESLint will take care of most of the style guide, but there are some things to consider when writing code:

- Don't create classes, use closures to emulate class state instead
- Make variables `const` unless they are really meant to be mutable
- Make typing as sound as possible (read this [](https://effectivetypescript.com/2021/05/06/unsoundness/)):
- avoid using `any` (use the safer `unknown` or `object` types instead)
- avoid using type casting at all
- avoid abusing optional chaining and assertion operators (`obj?.prop` or `obj!.prop`), see first it there is a better way to narrow down the type
- Prefix NodeJS's builtin modules with `node:` (for instance: `node:fs/promises`)
- Use `for ... of` or `for ... in` iterations unless the other way is clearly more benefical
- Give meaningful names for callback parameters when possible (`[propName, property]` instead of `[key, value]`)
- Prefer `import type { Type } from 'package'` over `import { type Type } from 'package'` when possible

## IA usage policy

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

[![npm](https://img.shields.io/npm/v/aeria.svg)](https://npmjs.com/package/aeria) ![https://github.com/aeria-org/aeria/actions/workflows/ci.yaml](https://github.com/aeria-org/aeria/actions/workflows/ci.yaml/badge.svg)

[Documentation](https://aeria.land/docs/aeria/)
[Documentation](https://aeria.land/docs/aeria/) |
[How to Contribute](.github/CONTRIBUTING.md)

Aeria is a minimalistic framework designed to streamline CRUD-based applications with a type-safe, developer-friendly experience. It ships a thin **MongoDB** abstraction layer and a [Prisma-like DSL](https://github.com/aeria-org/aeria-lang) that serves model definition with support for nested objects, arrays, references, upload fields, and more, making it ideal for applications with complex data structures and relational logic. On top of that a HTTP routing API with very simple bindings is provided to build business logic.

Expand Down

0 comments on commit 9be147b

Please sign in to comment.