Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
**Usage Policy for AI Agents**
# Agent Instructions

AI technology is restricted in its application within our operations. The following guidelines must be adhered to:
Read `./STYLE.md` before writing any code in this repository.

- **Minor Tasks Only**: AI is permitted to perform small, routine tasks that do not significantly impact overall outcomes.
- **Error Correction**: AI may be utilized to identify and correct hard errors, ensuring accuracy and functionality.
- **Limitations on Major Activities**: AI is not authorized to engage in large-scale projects or decision-making processes that require complex human judgment.
If a containerized environment is detected, ask the user for a UID:GID to set file ownership to.

- TypeScript: Follow the style guide; use global eslint rules.
- Go: Follow the style guide; use `//nolint` for suppression.
8 changes: 8 additions & 0 deletions STYLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Style Guide

1. Global eslint rules (TypeScript) and `//nolint` (Go) are allowed for following these rules.
2. Use camelCase when possible.
3. Do not put curly braces on separate lines.
4. Use tabs instead of spaces for indentation.
5. Use inline format strings (`${var}` in TypeScript, `fmt.Sprintf` with direct verbs in Go) instead of positional placeholder strings.
6. Keep it simple, stupid.
File renamed without changes.
10 changes: 9 additions & 1 deletion backend/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@ func getAuth(wsClient *websocket.Conn) bool {
user.randomText = randomText
user.username = messages[1] // TODO: Do bounds checking before 1.0
err := wsClient.WriteMessage(1, []byte("CHALLENGE "+randomText+" "+pgppubkeycrypto.GetHexKeyID()))
if err != nil {
wsClient.WriteMessage(1, []byte("500")) // dont really care if this gets to the client since there is already a error
return false
}
prodLogln(err)
prodLogln(messages)
err = wsClient.WriteMessage(1, []byte("MOTD "+motd))
if err != nil {
wsClient.WriteMessage(1, []byte("500")) // this is only during auth since it is kindof messy i can put this in a function and put it everywhere for 1.0
return false
}
prodLogln(sens(user))
case "AUTH":
prodLogln(sens(messages[1]))
Expand Down Expand Up @@ -99,7 +108,6 @@ func handleWSClient(httpClient http.ResponseWriter, httpRequest *http.Request) {
fmt.Printf("Websocket upgrade failed: %s\n", err.Error())
return
}
wsClient.WriteMessage(0, []byte("MOTD "+motd))
authDone := getAuth(wsClient)
if !authDone {
prodLogln(httpRequest.RemoteAddr + " Failed auth")
Expand Down
68 changes: 35 additions & 33 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

*.tsbuildinfo
# testing
/coverage

.eslintcache
# next.js
/.next/
/out/

# Cypress
/cypress/videos/
/cypress/screenshots/
# production
/build

# Vitest
__screenshots__/
# misc
.DS_Store
*.pem

# Vite
*.timestamp-*-*.mjs
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
3 changes: 0 additions & 3 deletions frontend/.vscode/extensions.json

This file was deleted.

7 changes: 7 additions & 0 deletions frontend/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
First, read `../AGENTS.md` for project-wide AI usage policies.

<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->
1 change: 1 addition & 0 deletions frontend/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
52 changes: 23 additions & 29 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
# ChatWS Frontend
This is the vue frontend for ChatWS.
Also ignore the error in tsconfig.node.json the error is false.
The rest is from the template readme.
## Recommended IDE Setup
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## Getting Started

## Recommended Browser Setup
First, run the development server:

- Chromium-based browsers (Chrome, Edge, Brave, etc.):
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
- Firefox:
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

## Type Support for `.vue` Imports in TS
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

## Customize configuration
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

See [Vite Configuration Reference](https://vite.dev/config/).
## Learn More

## Project Setup
To learn more about Next.js, take a look at the following resources:

```sh
npm install
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

### Compile and Hot-Reload for Development
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

```sh
npm run dev
```
## Deploy on Vercel

### Type-Check, Compile and Minify for Production
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

```sh
npm run build
```
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
1 change: 0 additions & 1 deletion frontend/env.d.ts

This file was deleted.

18 changes: 18 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";

const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
]),
]);

export default eslintConfig;
13 changes: 0 additions & 13 deletions frontend/index.html

This file was deleted.

7 changes: 7 additions & 0 deletions frontend/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
};

export default nextConfig;
Loading