{"id":30172916,"url":"https://github.com/lgdlong/dev-wiki","last_synced_at":"2026-04-11T04:32:43.297Z","repository":{"id":304654918,"uuid":"1017504369","full_name":"lgdlong/dev-wiki","owner":"lgdlong","description":"a web save your dev team's training time","archived":false,"fork":false,"pushed_at":"2026-02-15T15:36:52.000Z","size":2100,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-15T22:43:57.600Z","etag":null,"topics":["gin-gonic","go","golang","nestjs","nextjs","postgres","render-deployment","shadcn-ui","tailwind-css","tailwindcss","turporepo","vercel-deployment"],"latest_commit_sha":null,"homepage":"https://devwiki.lgdlong.site","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lgdlong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-10T16:25:54.000Z","updated_at":"2025-12-03T20:35:45.000Z","dependencies_parsed_at":"2025-08-19T23:15:43.547Z","dependency_job_id":"90a9ab4b-7417-4e62-bc7c-08bad341313f","html_url":"https://github.com/lgdlong/dev-wiki","commit_stats":null,"previous_names":["lgdlong/dev-wiki"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lgdlong/dev-wiki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgdlong%2Fdev-wiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgdlong%2Fdev-wiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgdlong%2Fdev-wiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgdlong%2Fdev-wiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lgdlong","download_url":"https://codeload.github.com/lgdlong/dev-wiki/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgdlong%2Fdev-wiki/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31669115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gin-gonic","go","golang","nestjs","nextjs","postgres","render-deployment","shadcn-ui","tailwind-css","tailwindcss","turporepo","vercel-deployment"],"created_at":"2025-08-11T23:18:17.482Z","updated_at":"2026-04-11T04:32:43.244Z","avatar_url":"https://github.com/lgdlong.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dev Wiki Monorepo\n\n\u003e A comprehensive developer knowledge-sharing platform built with TypeScript, featuring video tutorials, product reviews, and community discussions.\n\n## Architecture Overview\n\nDev Wiki is a modern TypeScript-first monorepo that enables developers to share knowledge through interactive tutorials, video content, and product reviews. Built with scalability and developer experience in mind.\n\n### Tech Stack\n\n- **Frontend**: Next.js 15 (React 19) + Tailwind CSS + Shadcn/ui\n- **Backend**: NestJS + TypeORM + PostgreSQL\n- **Authentication**: JWT + Google OAuth + Role-based Access Control (RBAC)\n- **Monorepo**: Turborepo + pnpm workspaces\n- **Language**: TypeScript (strict mode)\n- **Code Quality**: ESLint + Prettier + shared configurations\n\n### Project Structure\n\n```\ndev-wiki/\n├── apps/\n│   ├── web/                 # Next.js frontend (port 3000)\n│   ├── api/                 # NestJS backend (port 8000)\n│   └── db/                  # Database scripts \u0026 Docker setup\n├── packages/\n│   ├── eslint-config/       # Shared ESLint rules\n│   ├── typescript-config/   # Shared TypeScript configs\n│   └── ui/                  # Shared React components (@repo/ui)\n└── docker-compose.yml       # PostgreSQL + development services\n```\n\n## Quick Start\n\n### Prerequisites\n\n- **Node.js** 18+\n- **pnpm** 9.0.0+\n- **Docker** (for PostgreSQL)\n\n### Setup\n\n1. **Clone and install dependencies:**\n\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd dev-wiki\n   pnpm install\n   ```\n\n2. **Start database:**\n\n   ```bash\n   docker compose up -d\n   ```\n\n3. **Configure environment variables:**\n\n   ```bash\n   # Copy environment files for each app\n   cp apps/api/.env.example apps/api/.env\n   cp apps/web/.env.example apps/web/.env\n   ```\n\n4. **Start development servers:**\n   ```bash\n   pnpm dev\n   ```\n\n### Access Points\n\n- **Frontend**: http://localhost:3000\n- **API**: http://localhost:8000\n- **API Documentation**: http://localhost:8000/api (Swagger)\n- **Database**: PostgreSQL on localhost:5432\n\n## Development Workflow\n\n### Essential Commands\n\n```bash\n# Install dependencies\npnpm install\n\n# Development (all apps)\npnpm dev\n\n# Individual apps\npnpm dev --filter=web    # Frontend only\npnpm dev --filter=api    # Backend only\n\n# Build\npnpm build               # All apps\npnpm build --filter=api  # Backend only\n\n# Testing\npnpm test               # All tests\npnpm test:e2e          # End-to-end tests\npnpm test:cov          # Coverage report\n\n# Code quality\npnpm lint              # Lint all code\npnpm lint --fix        # Auto-fix issues\npnpm format            # Format code\n```\n\n### Database Management\n\n```bash\n# Start PostgreSQL\ndocker compose up -d\n\n# View logs\ndocker compose logs postgres\n\n# Connect to database\ndocker exec -it dev-wiki-postgres psql -U devwiki -d devwiki\n```\n\n## Database Setup\n\nFor detailed database connection information and configuration, see the [Database README](./apps/db/README.md).\n\nFor step-by-step backup instructions with DBeaver, see [Database Backup Guide](./apps/db/BACKUP_DUMP_DBEAVER.md).\n\n## Authentication \u0026 RBAC\n\n1. **JWT Tokens**: Stored in localStorage for API authentication\n2. **Role Cookies**: Set by backend, read by frontend middleware for RBAC\n3. **Google OAuth**: Integrated via Passport.js\n4. **Roles**: `user`, `mod`, `admin` with route-level protection\n\n## Development Guidelines\n\n### Code Standards\n\n- **TypeScript strict mode** - No `any` types\n- **Shared configurations** - ESLint/Prettier/TypeScript\n- **Component patterns** - Reusable UI components in `@repo/ui`\n- **API patterns** - DTOs, Guards, Services, Controllers\n\n### Best Practices\n\n1. **Use pnpm** for all package management\n2. **Follow RBAC patterns** - Backend sets cookies, frontend enforces\n3. **Type-safe APIs** - Share types between frontend/backend\n4. **Test thoroughly** - Unit tests, E2E tests, coverage reports\n5. **Error handling** - Structured errors with user-friendly messages\n\n### Project Conventions\n\n- **File naming**: kebab-case for files, PascalCase for components\n- **Import order**: External → Internal → Relative\n- **Error handling**: Try/catch with specific error types\n- **Validation**: DTOs (backend) + Zod schemas (frontend)\n\n## Documentation\n\n### Application READMEs\n\n- [Frontend (Web App)](./apps/web/README.md)\n- [Backend (API)](./apps/api/README.md)\n- [Database Setup](./apps/db/README.md)\n\n### API Documentation\n\n- **Swagger UI**: http://localhost:8000/api (when running)\n\n## Troubleshooting\n\n### Common Issues\n\n**Database connection failed:**\n\n```bash\n# Ensure PostgreSQL is running\ndocker compose up -d\n```\n\n**TypeScript errors:**\n\n```bash\n# Rebuild types\npnpm build\n```\n\n**Port conflicts:**\n\n```bash\n# Check running processes\nlsof -i :3000  # Frontend\nlsof -i :8000  # Backend\nlsof -i :5432  # Database\n```\n\n**Build failures:**\n\n```bash\n# Clean and reinstall\nrm -rf node_modules\npnpm install\npnpm build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgdlong%2Fdev-wiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgdlong%2Fdev-wiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgdlong%2Fdev-wiki/lists"}