Skip to content

WordsEnigma: A word game across Redwood and Prisma

WordsEnigma is a fork with separate Redwood web and API workspaces. Its data model links users, languages, word banks, games and individual guesses. GraphQL services translate application operations into Prisma database calls.

Application and services Fork
  • Updated
  • TypeScript · 97.12%
  • Unlicense
Upstream credited
Repository languagesTypeScript 97.12%6

Shares calculated from GitHub Linguist bytes.

Language%Bytes
TypeScript97.12%487,080
CSS2.22%11,156
JavaScript0.4%2,001
Dockerfile0.16%807
HTML0.07%364
Shell0.02%125

GitHub · README · Language statistics

Overview

Why it exists

TypeScript dictionary validation and game solver engine supporting multiple languages and word lengths.

Best fit

Algorithmic word game logic and solver heuristics.

Getting started

These commands come from the repository documentation. They were not run during this review.

Tasks declared in manifests

Repository references

Excerpts from the repository’s guides, in their original language. Links open the inspected source revision.

Development and contributions

Testing with Jest

WordsEnigma/README.md

It’d be hard to scale from side project to startup without a few tests. Redwood fully integrates Jest with the front and the backends and makes it easy to keep your whole app covered by generating test files with all your components and services: To make the integration even more seamless, Redwood augments Jest with database scenarios and GraphQL mocking.
Read the full instructions ↗
Source documentation

2 documents read from 2 candidates.

Features and components 2

Data relationships
schema.prisma uses PostgreSQL. A Game belongs to a user and word, references a word bank, and has try rows. Language records connect words and user settings, so multilingual behavior has a stored data model.
Services and persistence
games.ts exposes list, read, create, update and delete resolvers using db.game. Relation resolvers fetch the associated user, word, bank and guesses. This layer keeps GraphQL operations close to the persistence model.

Architecture

The components and their connections remain available as text. The diagram adds an interactive view.

System context Context
  1. Redwood web UI
  2. GraphQL API
  3. Game service resolvers
  4. Prisma client
  5. PostgreSQL relations

Links verified in the repository.

Mermaid Interactive diagram (loads on open)

System overview of the components and connections verified in the repository.

Static architecture view for WordsEnigma
Static preview. The interactive diagram replaces it after Mermaid loads.
flowchart LR
  n0["Redwood web UI"]
  n1["GraphQL API"]
  n2["Game service resolvers"]
  n3["Prisma client"]
  n4["PostgreSQL relations"]
  n0 --> n1
  n1 --> n2
  n2 --> n3
  n3 --> n4
Text version of the diagram
  • Redwood web UI → GraphQL API
  • GraphQL API → Game service resolvers
  • Game service resolvers → Prisma client
  • Prisma client → PostgreSQL relations
Follow one path through the code

Follow the game resolver into findUnique, then its relation resolvers into the linked records. These generic CRUD methods do not by themselves explain guess validation or prove that a user can access only their own games.

Types and file structure

24 declared types, with 12 in the base-relationship overview.

Type diagram
classDiagram
direction TB
class t95c33d5ad155["f"] {
  constructor()
}
class tdfd20eddf50b["w6"] {
  constructor()
  bufferLength()
  encoding()
  setEncoding()
}
class t2f1e841c76de["e"] {
  constructor()
  submit()
  create()
}
class t4dc7653db721["r"] {
  constructor()
  create()
}
class t9218f580818e["n"] {
  constructor()
}
class t3faaab51d666["s"] {
  constructor()
}
class tba189d78e812["IProps"] {
  <<interface>>
}
class t1f16c646b417["IState"] {
  <<interface>>
}
class t04f5a721d14f["GameBoard"] {
  constructor()
  eventBus()
  componentDidMount()
  componentWillUnmount()
}
class tdc6fb562c12d["IProps"] {
  <<interface>>
}
class tee5c605d4895["IState"] {
  <<interface>>
}
class tb608dc0b97f4["Header"] {
  constructor()
  render()
}
class b9938495049a9["jwe"] {
  <<unresolved_base>>
}
t95c33d5ad155 ..> b9938495049a9 : declared base
class b612c3a755722["p6"] {
  <<unresolved_base>>
}
tdfd20eddf50b ..> b612c3a755722 : declared base
class bc2ce90cba9ba["Jqe"] {
  <<unresolved_base>>
}
t2f1e841c76de ..> bc2ce90cba9ba : declared base
class b1d2f8b85b03d["zqe"] {
  <<unresolved_base>>
}
t4dc7653db721 ..> b1d2f8b85b03d : declared base
class b6e2409b80935["t"] {
  <<unresolved_base>>
}
t4dc7653db721 ..> b6e2409b80935 : declared base
t4dc7653db721 <|-- t9218f580818e
class b9589272b3c41["Component"] {
  <<unresolved_base>>
}
t04f5a721d14f ..> b9589272b3c41 : declared base
class b5baf1888a7d2["Component"] {
  <<unresolved_base>>
}
tb608dc0b97f4 ..> b5baf1888a7d2 : declared base

Unresolved bases remain labelled; full signatures are not reconstructed.

Type index

Reference

221 / 221 eligible files read (962 in the tree); 0 oversized, 0 failed reads and 2 syntax diagnostics.

What the scan covers

Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.

Linguist statistics cover the whole repository and may include other languages.

File map
flowchart TD
  root["WordsEnigma"]
  f0["WordsEnigma/package.json"]
  root --> f0
  f1["WordsEnigma/api/src/services/games/games.ts"]
  root --> f1
  f2["README.md"]
  root --> f2
  f3["WordsEnigma/README.md"]
  root --> f3
  f4["WordsEnigma/docker-compose.yml"]
  root --> f4
  f5["WordsEnigma/graphql.config.js"]
  root --> f5
  f6["WordsEnigma/jest.config.js"]
  root --> f6
  f7["WordsEnigma/prettier.config.js"]
  root --> f7
  f8["WordsEnigma/api/jest.config.js"]
  root --> f8
  f9["WordsEnigma/api/package.json"]
  root --> f9
  f10["WordsEnigma/api/server.config.js"]
  root --> f10
  f11["WordsEnigma/scripts/seed.ts"]
  root --> f11
  f12["WordsEnigma/web/jest.config.js"]
  root --> f12
  f13["WordsEnigma/web/package.json"]
  root --> f13
  f14["WordsEnigma/.yarn/releases/yarn-3.2.1.cjs"]
  root --> f14
  f15["WordsEnigma/scripts/data/fr.ts"]
  root --> f15

Files to read 3

References