grÜppe projekt dotcom
HOMEPROJEKTSSERVICESABOUTKONTAKT
SYSTEM ACCEPTING PROJECTS

GRÜPPE
PROJEKT
DOTCOM

Building the infrastructure of tomorrow's web

NAVIGATION

  • Home
  • Projekts
  • Services
  • About
  • Kontakt

KONTAKT

  • nick@gruppeprojekt.com
  • Abita Springs ,LA

© 2026 GRÜPPE PROJEKT DOTCOM. ALL RIGHTS RESERVED.

ADMIN
← RETURN_TO_OVERVIEW
REL_DOC: SOJ_ARCH_V1.0.0
ARCHITECTURAL_WHITEPAPER

SKUNKORJUNK ARCHITECTURE

A comprehensive technical analysis of the SkunkOrJunk cannabis review platform: modern monolithic architecture, data-driven review system, terpene and effect profiling, editorial workflow, and the custom CMS that powers content operations.

SECTION_01

CORE PHILOSOPHY

A modern, monolithic approach leveraging Next.js for both frontend rendering and backend API logic. Cohesive development experience optimized for serverless-friendly environments with file-based data persistence.

PRINCIPLE_01

Modern Monolith

Next.js serves both frontend and backend from a single codebase. App Router for page rendering, API Routes for server-side logic. Unified deployment artifact simplifies operations.

FRONTEND: React + SSR/SSG
BACKEND: API Routes
PRINCIPLE_02

File-Based Persistence

SQLite database via Prisma ORM. Entire database in a single file—simplifies deployment, backup, and migration. Perfect for serverless and containerized environments with persistent disk.

DATABASE: /var/data/database.db
UPLOADS: /var/data/uploads/
PRINCIPLE_03

Data-Centric Reviews

Reviews are comprehensive data objects—not just text and ratings. Scientific profiles (terpenes), experiential data (effects), and rich media combine for multi-faceted product analysis.

TERPENE: Chemical composition %
EFFECT: Experiential impact tags
PRINCIPLE_04

Type-Safe Stack

TypeScript throughout. Prisma generates type-safe client from schema. Zod for runtime validation. Compile-time safety from database to UI.

TYPES: @prisma/client generated
VALIDATION: Zod schemas
SECTION_02

TECHNOLOGY STACK

Strategic selection of modern, production-proven technologies. Balance of high performance and rich UX with simplicity and ease of deployment.

CORE_TECHNOLOGIES
FRAMEWORKNEXT.JS ^15.5.6
REACT18.2.0 (PINNED)
ORMPRISMA 5.16.0
DATABASESQLITE (better-sqlite3)
AUTHNEXTAUTH.JS 4.24
STYLINGTAILWIND CSS ^3.4
VALIDATIONZOD 4.1
TESTINGVITEST 4.0
AUTHENTICATION

NextAuth.js with credentials-based login. bcrypt for password hashing. Middleware-protected admin routes at /admin/:path*. Session management with secure cookies.

FILE_UPLOADS

formidable library parses multipart/form-data. URL rewrite in next.config.js maps /uploads/* to /api/uploads/* for secure file serving. Persistent storage at UPLOAD_DIR.

FULL_TEXT_SEARCH

SQLite FTS via scripts/create-fts.js. Creates reviews_fts virtual table for efficient keyword search. Raw queries via prisma.$queryRawUnsafe for SQLite-specific features.

SECTION_03

PROJECT STRUCTURE

Standard Next.js App Router structure. Conventional layout enhances maintainability, reduces learning curve, and ensures clear separation of concerns.

src/app/

APPLICATION_CORE

api/ — Backend API routes

admin/ — Protected admin pages

reviews/[slug]/ — Review pages

archive/ — Review archive

page.tsx — Homepage

src/app/api/

API_ENDPOINTS

reviews/ — Review CRUD

reviews/draft/ — Draft management

sponsors/ — Sponsor management

upload/ — File uploads

[...nextauth]/ — Auth handlers

SUPPORTING

DIRECTORIES

src/components/ — Reusable UI

src/lib/ — Utilities, Prisma

prisma/ — Schema, migrations

scripts/ — Build utilities

public/ — Static assets

SECTION_04

DATABASE SCHEMA

Defined in prisma/schema.prisma. Blueprint for application data with core models, relationships, and join tables for many-to-many associations.

REVIEW

Central model. strainName, method, brand, thc%, images (product, packaging, brandLogo). title, slug, excerpt, content.

HAS_MANY: Terpene, ReviewEffect, ReviewSponsor
TERPENE

Chemical compound data. name (Myrcene, Limonene, etc.) and percentage. Linked directly to Review.

BELONGS_TO: Review
EFFECT

Dictionary of possible effects. "Relaxed", "Creative", "Happy", etc. Many-to-many with Review via ReviewEffect.

LINK: ReviewEffect join table
SPONSOR

Brand partners. name, logo, url, category, active flag. Many-to-many with Review via ReviewSponsor.

LINK: ReviewSponsor join table
ADMINUSER

Application administrators. email, passwordHash (bcrypt). Used by NextAuth credentials provider.

AUTH: Credentials-based login
SETTING

Key-value store. Site config: siteName, logo, highlightA/B colors, contactEmail, termsContent, privacyContent.

GLOBAL: Site-wide configuration
ENTITY_RELATIONSHIPS
REVIEW
← 1:N → TERPENE← M:N → EFFECT (via ReviewEffect)← M:N → SPONSOR (via ReviewSponsor)
SECTION_05

EDITORIAL WORKFLOW

Four-step content pipeline from draft creation to publication. API endpoints and admin interfaces at each stage ensure quality control.

WORKFLOW_STAGES
1.
DRAFT_CREATION

POST /api/reviews/draft/ — Core details entered, saved as draft

2.
DATA_ENRICHMENT

Images via /api/upload/, effects assigned, terpene %s entered

3.
QUEUE_SUBMISSION

POST /api/reviews/draft/[id]/submit/ — Status → PENDING

4.
MODERATION

POST /api/admin/reviews/[id]/approve/ — Publish or reject

ADMIN_INTERFACES
/admin/drafts/

Draft management interface. Create, edit, enrich content.

/admin/reviews/queue/

Moderation queue. Review pending submissions.

/admin/reviews/

Published review management. Search, filter, edit, delete.

/admin/settings/

Site-wide configuration. Branding, theming, legal content.

REVIEW_STATUS_FLOW
DRAFT
→
PENDING
→
PUBLISHED
or
REJECTED
SECTION_06

BUILD & DEPLOYMENT

Containerized deployment with Docker. Multi-stage build for optimized images. Persistent disk for SQLite database and user uploads.

BUILD_SCRIPT
prisma generate &&
node scripts/maybe-migrate.js &&
node scripts/create-fts.js &&
next build
1.Generate type-safe Prisma client
2.Apply pending database migrations
3.Create/update FTS virtual table
4.Compile Next.js standalone output
ENVIRONMENT_VARS
DATABASE_URL

/var/data/database.db — SQLite file path

UPLOAD_DIR

/var/data/uploads — Persistent file storage

NEXTAUTH_SECRET

Session signing key (long random string)

NEXTAUTH_URL

Canonical URL for auth callbacks

ADMIN_INIT_*

Initial admin email/password for seed

DOCKER_STRATEGY
MULTI-STAGE BUILD

deps → builder → runner stages. Minimal production image with only necessary artifacts.

STANDALONE OUTPUT

next.config.js: output: 'standalone'. Only essential files copied to .next/standalone.

PERSISTENT DISK

Mount at /var/data. Database and uploads preserved across deployments.

SECTION_07

AUTHENTICATION & SECURITY

NextAuth.js credentials provider with bcrypt password hashing. Middleware-based route protection for all administrative paths.

PROTECTED_ROUTES

/admin/:path*

All admin routes protected by middleware. Unauthenticated users redirected to login.

CREDENTIALS_FLOW

Login Process

Email + password → bcrypt compare against AdminUser.passwordHash → Session cookie issued.

PUBLIC_ROUTES

No Auth Required

Homepage, review pages (/reviews/[slug]), archive. All public content accessible without login.

PRODUCTION_READY

COMPREHENSIVE REVIEW
PLATFORM ARCHITECTURE.

SkunkOrJunk delivers data-centric cannabis reviews through a robust technical foundation. Modern monolith, scientific data integration, structured editorial workflow, and containerized deployment.

REQUEST DEMO← BACK TO OVERVIEW
← RETURN_TO_OVERVIEW
SOJ_ARCH_V1.0.0 | CLASSIFICATION: PUBLIC | STATUS: PRODUCTION