Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

federal crimes #2

Merged
merged 38 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b005bb0
Initial commit
nin0-dev Oct 24, 2024
fc48707
feat: load all rest routes
nin0-dev Oct 24, 2024
fefbf43
feat(routes): prefix route with /api/:moduleName
nin0-dev Oct 24, 2024
f4ef004
feat: auth (untested)
nin0-dev Oct 24, 2024
50dc071
fix(auth/register): use correct var name
nin0-dev Oct 24, 2024
99d6770
feat(env): Adding .env file support
Kodarru Oct 25, 2024
97545a9
fix(env): Make the server itself use env
Kodarru Oct 25, 2024
fcba247
fix(env): Didn't know built-in env file 💀
Kodarru Oct 25, 2024
c2a5510
chore: update example
nin0-dev Oct 25, 2024
001547e
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
nin0-dev Oct 25, 2024
c36f6a3
feat(decorators): Add decorators
Kodarru Oct 25, 2024
ea25d8f
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
Kodarru Oct 25, 2024
b6d8785
chore: insanities
nin0-dev Oct 25, 2024
d1237fe
chore(env): provide sane defaults
nin0-dev Oct 25, 2024
ffae13f
insani
nin0-dev Oct 25, 2024
ed19992
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
nin0-dev Oct 25, 2024
4cc8ebe
idk anymore
nin0-dev Oct 25, 2024
25b5050
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
nin0-dev Oct 25, 2024
f272845
add(decorators): Update example file
Kodarru Oct 25, 2024
f879db1
apply reviews
nin0-dev Oct 25, 2024
f596ea0
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
nin0-dev Oct 25, 2024
4e471d0
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
nin0-dev Oct 25, 2024
65ef5d0
Merge branch 'rerewrite' of https://github.com/nin0chat/rewrite into …
nin0-dev Oct 25, 2024
b9a2fd3
ci: add prettier workflow
PoolloverNathan Oct 25, 2024
50cbb38
reviuwing
nin0-dev Oct 25, 2024
b724308
fix(api) Update auth to use decorators & add URL prefix
Kodarru Oct 25, 2024
3b935d1
refactor(Snowflake): Use proper Snowflake implementation
wingio Oct 26, 2024
e06ff9a
lint(Snowflake): Apply lint
wingio Oct 26, 2024
a66e6dd
refactor: to all law enforcement entities, this is not an admission o…
splatterxl Oct 26, 2024
0a40c62
chore: formatting
splatterxl Oct 26, 2024
0b30b2f
STOP ADDING DOTENV
nin0-dev Oct 26, 2024
c26ca9d
fix(splatter): Fix splatter
Kodarru Oct 26, 2024
f3cbc98
feat: logger
nin0-dev Oct 26, 2024
9e7e1ac
fix(decorators): 👅👅👅
Kodarru Oct 26, 2024
e267441
refactor: do not match example routes
nin0-dev Oct 26, 2024
cc33de0
add auth checking
splatterxl Oct 27, 2024
9412585
remove testing for now
splatterxl Oct 27, 2024
54efc55
thing
nin0-dev Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Set this to either development or production.
NODE_ENV=production
# Server info
HOST=localhost
PORT=3000
# Postgres connection string
POSTGRES_URL="postgresql://postgres:postgres@localhost:5432/nin0chat"
# Cloudflare Turnstile site secret
TURNSTILE_SECRET=0x0000000000000000000000000000000000
# SMTP2Go API key
SMTP2GO_API_KEY=api-xxxxxxxxxxx
# Template ID for the SMTP2Go API
SMTP2GO_REGISTRATION_TEMPLATE=0000000
# Hostname for the web frontend
CLIENT_HOSTNAME="chat.nin0.dev"
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/prettier-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Prettier CI

on:
pull_request:
merge_group:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm i -g pnpm
- run: pnpm i
- run: ls ./{,node_modules/{,.bin/}}
- run: node_modules/.bin/prettier --check .
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,28 @@

## 📝 Table of contents

- [About](#-about)
- [Get started](#-get-started)
- [License](#-license)
- [About](#-about)
- [Get started](#-get-started)
- [License](#-license)

## 🧐 About
## 🧐 About

nin0chat is a silly simple chatroom that allows people to easily join just by opening the website and starting to chat. The goal is to have IRC, but better. This project was built using TypeScript, ElysiaJS, and Postgres.
nin0chat is a silly simple chatroom that allows people to easily join just by opening the website and starting to chat. The goal is to have IRC, but better. This project was built using TypeScript, Fastify, and Postgres.

Thanks to all the contributors who helped make this project possible!

## 🚀 Get started

As a user: go to https://chat.nin0.dev.
As a selfhoster:

<details>
<summary>Self-hosting guide</summary>
To get started with nin0chat, you will need to have the following installed on your machine:

- Node.js
- pnpm
- Postgres
- Node.js
- pnpm
- Postgres

Once you have the above installed, you can clone the repository and install the dependencies:

Expand All @@ -57,6 +58,7 @@ pnpm build && pnpm start
if you are running a production instance.

You should then be able to access the server on your desired port.

</details>

## 📜 License
Expand Down
15 changes: 0 additions & 15 deletions config.example.ts

This file was deleted.

29 changes: 28 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
{"dependencies":{"elysia":"^1.1.23"}}
{
"name": "backend",
"private": true,
"main": "dist/index.js",
"scripts": {
"dev": "tsx watch --env-file=.env --include \"**/*\" src/index.ts",
"build": "tsc",
"start": "node dist/index.js"
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
"@types/node": "^22.7.9",
"@types/pg": "^8.11.10",
"eslint": "^9.13.0",
"pino-pretty": "^11.3.0",
"prettier": "^3.3.3",
"tsx": "^4.19.1",
"typescript": "^5.6.3"
nin0-dev marked this conversation as resolved.
Show resolved Hide resolved
},
"dependencies": {
"bcrypt": "^5.1.1",
"fastify": "^5.0.0",
"fastify-decorators": "^3.16.1",
"fastify-file-routes": "^1.1.2",
"pg": "^8.13.0",
"pg-ipc": "^1.0.5"
}
}
Loading
Loading