Skip to content
Merged
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
231 changes: 0 additions & 231 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,237 +27,6 @@ playwright/.cache/
.env.local
.env.*.local
.env.production

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
*.env

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Mono auto generated files
mono_crash.*

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
[Aa][Rr][Mm]64[Ee][Cc]/
bld/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/

# Build results on 'Bin' directories
**/[Bb]in/*
# Uncomment if you have tasks that rely on *.refresh files to move binaries
# (https://github.com/github/gitignore/pull/3736)
#!**/[Bb]in/*.refresh

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.trx

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Approval Tests result files
*.received.*

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.idb
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
# but not Directory.Build.rsp, as it configures directory-level build defaults
!Directory.Build.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
"files": {
"ignoreUnknown": false,
"includes": ["e2e/", "hono/", "*.json", "*.ts"]
"includes": ["hono/**/*.ts", "hono/**/*.tsx", "e2e/**/*.ts", "*.json", "*.ts"]
},
"formatter": {
"enabled": true,
Expand Down
2 changes: 1 addition & 1 deletion e2e/app.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, test } from "@playwright/test";
import { TEST_ORIGIN, loginWithMock } from "./auth-helpers";
import { loginWithMock, TEST_ORIGIN } from "./auth-helpers";

test.beforeEach(async ({ page }) => {
// Wait for a server to be ready before running tests
Expand Down
4 changes: 2 additions & 2 deletions e2e/database-persistence.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, test } from "@playwright/test";
import { TEST_ORIGIN, loginWithMock } from "./auth-helpers";
import { loginWithMock, TEST_ORIGIN } from "./auth-helpers";

test.describe("Database Message Persistence", () => {
test.beforeEach(async ({ page }) => {
Expand Down Expand Up @@ -61,4 +61,4 @@ test.describe("Database Message Persistence", () => {
// This confirms that the message was persisted in the database and loaded on page refresh
await expect(page.locator("#messages")).toContainText(testMessage);
});
});
});
8 changes: 6 additions & 2 deletions hono/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { serveStatic } from "@hono/node-server/serve-static";
import { createNodeWebSocket } from "@hono/node-ws";
import { Hono } from "hono";
import { csrf } from "hono/csrf";
import type { MiddlewareHandler } from "hono/types";
import type { WSContext } from "hono/ws";
import { CookieStore, sessionMiddleware } from "hono-sessions";
import { auth } from "./routes/auth.js";
Expand All @@ -14,7 +15,7 @@ import { createWsRoute } from "./routes/ws.js";
import type { Variables } from "./types.js";

type AppOptions = {
sessionMiddleware?: (c: any, next: () => Promise<void>) => Promise<void>;
sessionMiddleware?: MiddlewareHandler<{ Variables: Variables }>;
};

export function createApp(options?: AppOptions) {
Expand Down Expand Up @@ -59,11 +60,14 @@ export function createApp(options?: AppOptions) {
app.route("/", health);
app.route("/", auth);
app.route("/", emailAuth);
app.route("/", testAuth);
app.route("/", messagesRoute);
app.route("/", index);
app.route("/", createWsRoute(upgradeWebSocket, clients));

if (process.env.NODE_ENV === "development") {
app.route("/", testAuth);
}

return { app, injectWebSocket };
}

Expand Down
10 changes: 5 additions & 5 deletions hono/components/AboutPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("AboutPage component", () => {
const jsxElement = await AboutPage();

const html = jsxElement.toString();

// Check for all required content elements
expect(html).toContain("About Mlack");
expect(html).toContain("Slack-like application that&#39;s fully open source");
Expand Down Expand Up @@ -48,15 +48,15 @@ describe("AboutPage component", () => {
const jsxElement = await AboutPage();

const html = jsxElement.toString();

// Check that external links have proper security attributes
expect(html).toContain('target="_blank"');
expect(html).toContain('rel="noopener noreferrer"');

// Check for the GitHub link
expect(html).toContain('href="https://github.com/mahata/mlack"');

// Check for the Copilot documentation link
expect(html).toContain('href="https://docs.github.com/en/copilot/concepts/about-copilot-coding-agent"');
});
});
});
38 changes: 24 additions & 14 deletions hono/components/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,42 @@ export async function AboutPage() {
<body>
<div className="about-container">
<h1 className="page-title">About Mlack</h1>

<div className="content">
<p>
Mlack is a Slack-like application that's fully open source.
The source code is available at <a href="https://github.com/mahata/mlack" target="_blank" rel="noopener noreferrer">@mahata/mlack</a>.
Mlack is a Slack-like application that's fully open source. The source code is available at{" "}
<a href="https://github.com/mahata/mlack" target="_blank" rel="noopener noreferrer">
@mahata/mlack
</a>
.
</p>

<p>
This is an experimental project designed to build a real-world application using "Vibe Coding".
Around 90% of the code is written by{" "}
<a href="https://docs.github.com/en/copilot/concepts/about-copilot-coding-agent" target="_blank" rel="noopener noreferrer">
This is an experimental project designed to build a real-world application using "Vibe Coding". Around 90%
of the code is written by{" "}
<a
href="https://docs.github.com/en/copilot/concepts/about-copilot-coding-agent"
target="_blank"
rel="noopener noreferrer"
>
GitHub Copilot Coding Agent
</a>.
</a>
.
</p>

<p>
The project explores what's possible when combining human creativity with AI assistance
to rapidly prototype and build functional applications.
The project explores what's possible when combining human creativity with AI assistance to rapidly
prototype and build functional applications.
</p>
</div>

<div className="navigation">
<a href="/" className="back-link">← Back to Chat</a>
<a href="/" className="back-link">
← Back to Chat
</a>
</div>
</div>
</body>
</html>
);
}
}
Loading
Loading