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
172 changes: 172 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
.PHONY: help install dev build clean db-up db-down db-restart db-clean db-migrate db-generate db-push db-studio docker-down docker-clean dev-client dev-server dev-landing dev-all clean-deps clean-build clean-all format lint check-types

# Default target - show help
help:
@echo "MemoBrain - Available Make Commands"
@echo ""
@echo "πŸ“¦ Installation & Setup:"
@echo " make install - Install all dependencies"
@echo ""
@echo "πŸ—„οΈ Database Commands:"
@echo " make db-up - Start database container"
@echo " make db-down - Stop database container"
@echo " make db-restart - Restart database container"
@echo " make db-clean - Stop and remove database container & volumes"
@echo " make db-generate - Generate Drizzle migrations"
@echo " make db-push - Push schema changes to database"
@echo " make db-migrate - Run database migrations"
@echo " make db-studio - Open Drizzle Studio"
@echo ""
@echo "🐳 Docker Commands:"
@echo " make docker-down - Stop all Docker containers"
@echo " make docker-clean - Remove all containers, volumes, and images"
@echo ""
@echo "πŸš€ Development Commands:"
@echo " make dev - Run all apps in development mode (turbo)"
@echo " make dev-client - Run client app only"
@echo " make dev-server - Run server app only"
@echo " make dev-landing - Run landing app only"
@echo " make dev-all - Run all apps individually (parallel)"
@echo ""
@echo "πŸ—οΈ Build Commands:"
@echo " make build - Build all apps"
@echo " make build-client - Build client app only"
@echo " make build-server - Build server app only"
@echo " make build-landing - Build landing app only"
@echo ""
@echo "🧹 Cleanup Commands:"
@echo " make clean-deps - Remove all node_modules"
@echo " make clean-build - Remove all build artifacts"
@echo " make clean-all - Remove all generated files (deps + builds)"
@echo " make clean - Alias for clean-all"
@echo ""
@echo "πŸ”§ Utility Commands:"
@echo " make format - Format code with Prettier"
@echo " make lint - Lint all packages"
@echo " make check-types - Type-check all packages"
@echo ""

# Installation
install:
@echo "πŸ“¦ Installing dependencies..."
bun install

# Database Commands
db-up:
@echo "πŸ—„οΈ Starting database..."
cd packages/db && docker compose up -d

db-down:
@echo "πŸ›‘ Stopping database..."
cd packages/db && docker compose down

db-restart:
@echo "πŸ”„ Restarting database..."
cd packages/db && docker compose restart

db-clean:
@echo "🧹 Cleaning database (removing containers and volumes)..."
cd packages/db && docker compose down -v

db-generate:
@echo "πŸ”¨ Generating Drizzle migrations..."
cd packages/db && bun run drizzle:generate

db-push:
@echo "⬆️ Pushing schema to database..."
cd packages/db && bun run drizzle:push

db-migrate:
@echo "πŸš€ Running database migrations..."
cd packages/db && bun run drizzle:migrate

db-studio:
@echo "🎨 Opening Drizzle Studio..."
cd packages/db && bun run drizzle:studio

# Docker Commands
docker-down:
@echo "🐳 Stopping all Docker containers..."
docker compose down

docker-clean:
@echo "🧹 Cleaning all Docker resources..."
docker compose down -v --rmi all --remove-orphans

# Development Commands
dev:
@echo "πŸš€ Starting all apps in development mode..."
bun run dev

dev-client:
@echo "πŸš€ Starting client app..."
cd apps/client && bun run dev

dev-server:
@echo "πŸš€ Starting server app..."
cd apps/server && bun run dev

dev-landing:
@echo "πŸš€ Starting landing app..."
cd apps/landing && bun run dev

dev-all:
@echo "πŸš€ Starting all apps individually..."
@echo "Note: Run each in a separate terminal or use a process manager"
@echo "Terminal 1: make dev-client"
@echo "Terminal 2: make dev-server"
@echo "Terminal 3: make dev-landing"

# Build Commands
build:
@echo "πŸ—οΈ Building all apps..."
bun run build

build-client:
@echo "πŸ—οΈ Building client app..."
cd apps/client && bun run build

build-server:
@echo "πŸ—οΈ Building server app..."
cd apps/server && bun run build

build-landing:
@echo "πŸ—οΈ Building landing app..."
cd apps/landing && bun run build

# Cleanup Commands
clean-deps:
@echo "🧹 Removing all node_modules..."
rm -rf node_modules
rm -rf apps/*/node_modules
rm -rf packages/*/node_modules
@echo "βœ… Dependencies cleaned!"

clean-build:
@echo "🧹 Removing build artifacts..."
rm -rf apps/client/dist
rm -rf apps/landing/.next
rm -rf apps/server/dist
rm -rf packages/*/dist
rm -rf .turbo
@echo "βœ… Build artifacts cleaned!"

clean-all: clean-build clean-deps
@echo "🧹 Removing all generated files..."
rm -rf bun.lockb
@echo "βœ… All cleaned! Run 'make install' to reinstall."

clean: clean-all

# Utility Commands
format:
@echo "✨ Formatting code..."
bun run format

lint:
@echo "πŸ” Linting code..."
bun run lint

check-types:
@echo "πŸ”Ž Type-checking..."
bun run check-types
1 change: 1 addition & 0 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"check-types": "tsc --noEmit"
},
"dependencies": {
"@assets": "workspace:*",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
Expand Down
58 changes: 5 additions & 53 deletions apps/client/src/index.css
Original file line number Diff line number Diff line change
@@ -1,70 +1,22 @@
@import "tailwindcss";
@import "@repo/tailwind-config/theme.css";

:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}

body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}

h1 {
font-size: 3.2em;
line-height: 1.1;
}

button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
display: flex;
place-items: center;
/* Use shared Tailwind color tokens from packages/tailwind-config/theme.css */
@apply bg-background text-text;
}
6 changes: 6 additions & 0 deletions apps/client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'node:path'

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@assets': path.resolve(__dirname, '../..', 'packages/assets'),
},
},
})
47 changes: 1 addition & 46 deletions apps/landing/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,53 +1,8 @@
@import "tailwindcss";
@import "@repo/tailwind-config/theme.css";

:root {
--background: #ffffff;
--foreground: #171717;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

html,
body {
max-width: 100vw;
overflow-x: hidden;
}

body {
color: var(--foreground);
background: var(--background);
}

* {
box-sizing: border-box;
padding: 0;
margin: 0;
}

a {
color: inherit;
text-decoration: none;
}

.imgDark {
display: none;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}

.imgLight {
display: none;
}
.imgDark {
display: unset;
}
}
}
2 changes: 1 addition & 1 deletion apps/landing/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" className="bg-background text-text">
<body className={`${geistSans.variable} ${geistMono.variable}`}>
{children}
</body>
Expand Down
Loading
Loading