Spacebar server - A reimplementation of the Discord.com backend, built with Typescript and love
This report summarizes scanner evidence for spacebarchat/server, a TypeScript project with 2,211 GitHub stars. SynthScan examined 132,560 lines of code across 1364 source files, recording 84 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 0.8 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 71 finding(s).
Are imports declared and package/API names verified? 10 finding(s).
Are wrappers, guards, and repeated structures necessary? 14 finding(s).
Which changes need focused human review? 84 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 84 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tsconfig.json | 81 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant Jav | COMMENT |
| LOW | …pi/Spacebar.UApi/Controllers/GuildStickerController.cs | 21 | // | COMMENT |
| LOW | …acebar.UApi/Controllers/Messages/MessagesController.cs | 21 | // { | COMMENT |
| LOW | …pi/DataMappings/Spacebar.DataMappings.AdminApi/User.cs | 1 | using Spacebar.Models.AdminApi; | COMMENT |
| LOW | …pi/DataMappings/Spacebar.DataMappings.AdminApi/User.cs | 21 | // PrimaryGuild = user.PrimaryGuild, | COMMENT |
| LOW | …in-api/Spacebar.Cdn/Extensions/FileSourceExtensions.cs | 1 | // using ImageMagick; | COMMENT |
| LOW | …in-api/Spacebar.Cdn/Extensions/FileSourceExtensions.cs | 21 | // // } | COMMENT |
| LOW | …min-api/Spacebar.Cdn/Controllers/GetImageController.cs | 1 | // using ArcaneLibs.Extensions.Streams; | COMMENT |
| LOW | …min-api/Spacebar.Cdn/Controllers/GetImageController.cs | 21 | // var original = await fs.GetFile(Request.Path); | COMMENT |
| LOW | …min-api/Spacebar.Cdn/Controllers/GetImageController.cs | 41 | // }); | COMMENT |
| LOW | …a/admin-api/Spacebar.Cdn/Controllers/UserController.cs | 41 | // var originalKey = fs.BaseUrl + Request.Path; | COMMENT |
| LOW | …a/admin-api/Spacebar.Cdn/Controllers/UserController.cs | 61 | // } | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 1 | // #if DEBUG | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 21 | // return pads.IsPixelArt(img); | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 41 | // Quality = Request.Query.ContainsKey("quality") && Enum.TryParse<DiscordImageResizeQuality>(Request.Qu | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 61 | // | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 81 | // Passthrough = Request.Query.ContainsKey("passthrough") && bool.TryParse(Request.Query["passthrough"], | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 101 | // img = dirs.Apply(img, resizeParams); | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 121 | // ? quality | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 141 | // if (resizeParams.Size.HasValue) | COMMENT |
| LOW | …pacebar.Cdn/Controllers/Internal/GetImageController.cs | 161 | // } | COMMENT |
| LOW | …a/admin-api/Tests/Spacebar.Tests/Tests/MessageTests.cs | 221 | var res = await Assert.HttpSuccess(await Client.ApiHttpClient.PostAsync($"channels/{Channel.Id}/messages", reqCo | COMMENT |
| LOW | …a/admin-api/Tests/Spacebar.Tests/Tests/MessageTests.cs | 241 | // var res = await Assert.HttpSuccess(await Client.ApiHttpClient.PostAsync($"channels/{Channel.Id}/messa | COMMENT |
| LOW | extra/admin-api/Tests/Spacebar.Tests/Tests/DMTests.cs | 21 | COMMENT | |
| LOW | extra/admin-api/Tests/Spacebar.Tests/Tests/DMTests.cs | 41 | // [Fact] | COMMENT |
| LOW | extra/admin-api/Tests/Spacebar.Tests/Tests/DMTests.cs | 61 | // }); | COMMENT |
| LOW | extra/admin-api/Tests/Spacebar.Tests/Tests/DMTests.cs | 81 | // | COMMENT |
| LOW | …pi/Utilities/Spacebar.Client/wwwroot/service-worker.js | 1 | // In development, always fetch from the network and do not enable offline support. | COMMENT |
| LOW | …in-api/Utilities/Spacebar.Cdn.Migration/FsckService.cs | 181 | // ItemId = x.Id | COMMENT |
| LOW | …i.PrepareTestData/TestDataTypes/MessageSpamTestData.cs | 61 | // var success = false; | COMMENT |
| LOW | …repareTestData/TestDataTypes/AttachmentSpamTestData.cs | 61 | // var success = false; | COMMENT |
| LOW | extra/admin-api/Spacebar.Cdn.Worker/Program.cs | 21 | // fs.Flush(); | COMMENT |
| LOW | extra/admin-api/Spacebar.Cdn.Worker/Program.cs | 41 | // Console.WriteLine(" => " + sw2.Elapsed); | COMMENT |
| LOW | scripts/schema.js | 161 | (x.endsWith("Schema") || x.endsWith("Response") || x.startsWith("API") || x.endsWith("Array")) && | COMMENT |
| LOW | src/database/entities/Guild.ts | 41 | import { User } from "./User"; | COMMENT |
| LOW | src/database/entities/ThreadMember.ts | 121 | // // @ts-ignore | COMMENT |
| LOW | src/database/entities/ThreadMember.ts | 141 | // } satisfies GuildMemberUpdateEvent) | COMMENT |
| LOW | src/database/entities/ThreadMember.ts | 161 | // data: { | COMMENT |
| LOW | src/database/entities/ThreadMember.ts | 181 | // await Promise.all([ | COMMENT |
| LOW | src/database/entities/ReadState.ts | 81 | // delete res.badge_count; | COMMENT |
| LOW | src/database/entities/Categories.ts | 21 | import { DiscoveryCategory } from "@spacebar/schemas"; | COMMENT |
| LOW | src/util/util/json/JsonSerializer.test.ts | 121 | // // write a massive json file | COMMENT |
| LOW | src/util/util/json/JsonSerializer.test.ts | 141 | // } | COMMENT |
| LOW | src/schemas/Validator.ts | 21 | import fs from "node:fs"; | COMMENT |
| LOW | src/schemas/responses/SettingsProtoUpdateResponse.ts | 41 | // settings: PreloadedUserSettings; | COMMENT |
| LOW | src/schemas/uncategorised/SettingsProtoUpdateSchema.ts | 41 | // required_data_version?: number; | COMMENT |
| LOW | src/schemas/gateway/IdentifySchema.ts | 21 | import { ActivitySchema } from "@spacebar/schemas"; | COMMENT |
| LOW | src/schemas/gateway/IdentifySchema.ts | 41 | // $$referrer: String, | COMMENT |
| LOW | src/api/util/handlers/Instance.ts | 21 | import { TimeSpan } from "@spacebar/extensions"; | COMMENT |
| LOW | src/gateway/util/Utils.ts | 61 | // Temporary cleanup function until shutdown cleanup function is fixed. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …n-api/Spacebar.AdminApi/Controllers/GuildController.cs | 0 | delete from messages where id in ( select id from messages where author_id = {authorid} and channel_id = {channelid} and | STRING |
| HIGH | …in-api/Spacebar.AdminApi/Controllers/UserController.cs | 0 | delete from messages where id in ( select id from messages where author_id = {authorid} and channel_id = {channelid} and | STRING |
| HIGH | …api/Spacebar.AdminApi/Controllers/ChannelController.cs | 0 | delete from messages where id in ( select id from messages where author_id = {authorid} and channel_id = {channelid} and | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …i/Controllers/Applications/ApplicationRpcController.cs | 16 | // TODO: implement disclosures | COMMENT |
| LOW | extra/admin-api/Models/Spacebar.Models.Generic/Guild.cs | 42 | public List<object> GuildScheduledEvents { get; set; } // TODO: implement | CODE |
| LOW | src/util/util/FieldError.ts | 51 | // TODO: implement Image data type: Data URI scheme that supports JPG, GIF, and PNG formats. An example Data URI format | COMMENT |
| LOW | src/util/util/json/JsonSerializer.ts | 108 | //TODO: implement | COMMENT |
| LOW | src/util/util/json/JsonSerializer.ts | 113 | // TODO: implement | COMMENT |
| LOW | src/api/routes/reporting/index.ts | 61 | // TODO: implement | COMMENT |
| LOW | src/api/routes/reporting/index.ts | 82 | // TODO: implement | COMMENT |
| LOW | src/api/routes/guilds/#guild_id/integrations.ts | 23 | //TODO: implement integrations list | COMMENT |
| LOW | src/api/routes/guilds/#guild_id/audit-logs.ts | 26 | //TODO: implement audit logs | COMMENT |
| LOW | src/gateway/opcodes/RequestChannelStatuses.ts | 30 | // TODO: implement | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/schema.js | 333 | function deleteOneOfKindUndefinedRecursive(obj, path) { | CODE |
| LOW | scripts/schema.js | 401 | async function removeAllMatchingRecursive(o, selector, maxDepth = 32, path = "$") { | CODE |
| LOW | scripts/util/getRouteDescriptions.js | 100 | function getPrefixedRouteDescriptions(routePrefix, root) { | CODE |
| LOW | src/cdn/routes/avatar-decoration-presets.ts | 43 | async function tryReturnFromCollectiblesShop(req: Request, res: Response, avatar_decoration_data_asset: string) { | CODE |
| LOW | src/api/util/handlers/Message.ts | 603 | export async function processMessageOptionAttachments(source: MessageOptions, destination: Message) { | CODE |
| LOW | src/api/util/handlers/Message.ts | 648 | export async function convertCloudAttachmentToAttachment(cloudAttachmentReference: MessageCreateCloudAttachment, destina | CODE |
| LOW | src/api/util/handlers/Message.ts | 690 | async function handleMessageMentionsAsync(message: Message) { | CODE |
| LOW | src/api/util/utility/polls.ts | 25 | export async function generatePollResultsMessage(options: MessageOptions): Promise<MessageOptions> { | CODE |
| LOW | src/api/util/utility/EmbedHandlers.ts | 562 | export async function dropDuplicateCacheEntries(entries: EmbedCache[]): Promise<EmbedCache[]> { | CODE |
| LOW | src/api/util/utility/EmbedHandlers.ts | 608 | export async function getOrUpdateEmbedCache(urls: string[], cb?: (url: string, embeds: Embed[]) => Promise<void>): Promi | CODE |
| LOW | src/gateway/util/Utils.ts | 100 | export async function handleOffloadedGatewayRequest(socket: WebSocket, url: string, body: unknown): Promise<boolean> { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | assets/schemas.json | 13664 | "placeholder": { | CODE |
| LOW | assets/schemas.json | 14053 | "placeholder": { | CODE |
| LOW | assets/schemas.json | 14335 | "placeholder": { | CODE |
| LOW | assets/schemas.json | 14407 | "placeholder": { | CODE |
| LOW | assets/schemas.json | 14532 | "placeholder": { | CODE |
| LOW | assets/schemas.json | 14892 | "placeholder": { | CODE |
| LOW | …migration/postgres/1787497429170-AttachmentMetadata.ts | 11 | await queryRunner.query(`ALTER TABLE "attachments" ADD "placeholder" character varying`); | CODE |
| LOW | …migration/postgres/1787497429170-AttachmentMetadata.ts | 23 | await queryRunner.query(`ALTER TABLE "attachments" DROP COLUMN "placeholder"`); | CODE |
| LOW | src/api/routes/users/@me/billing/payment-sources.ts | 36 | name: "John Doe", | CODE |
| LOW | src/api/routes/users/@me/billing/payment-sources.ts | 37 | line_1: "123 Main Street", | CODE |