Skip to content

Commit 0c16421

Browse files
docs: update README.md and add techstack doc (#131)
Co-authored-by: Lam Ngoc Khuong <[email protected]>
1 parent 414cc6b commit 0c16421

File tree

4 files changed

+366
-45
lines changed

4 files changed

+366
-45
lines changed

apps/docs/content/_meta.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export default {
22
index: "",
3+
techstack: "",
34
"style-guides": "",
5+
testing: "",
46
};

apps/docs/content/techstack.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Techstack
2+
3+
This document describes the technology stack used in different profiles of the project.
4+
5+
## RealWorld API
6+
7+
The RealWorld API is a standard implementation of the RealWorld specification.
8+
9+
### Backend Stack
10+
11+
- **Framework**: [NestJS](https://nestjs.com/) - A progressive Node.js framework with Fastify HTTP engine
12+
- **Language**: [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript
13+
- **Database**: [PostgreSQL](https://www.postgresql.org/) - Relational database
14+
- **ORM**: [TypeORM](https://typeorm.io/) - Object-Relational Mapping
15+
- **Authentication**: [JWT](https://jwt.io/) - JSON Web Tokens
16+
- **API Documentation**: [Swagger/OpenAPI](https://swagger.io/) - API documentation
17+
- **Testing**:
18+
- [Jest](https://jestjs.io/) - Testing framework
19+
- [Supertest](https://github.com/visionmedia/supertest) - HTTP testing
20+
21+
### Key Features
22+
23+
- RESTful API endpoints
24+
- JWT-based authentication
25+
- PostgreSQL database integration
26+
- TypeORM for database operations
27+
- Swagger documentation
28+
- Request validation
29+
- Error handling
30+
- Logging with Winston
31+
32+
## RealWorldX API
33+
34+
The RealWorldX API is an extended version with additional features and optimizations.
35+
36+
### Backend Stack
37+
38+
- **Framework**: [NestJS](https://nestjs.com/) - A progressive Node.js framework with Fastify HTTP engine
39+
- **Language**: [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript
40+
- **Database**: [MySQL](https://www.mysql.com/) - Relational database
41+
- **ORM**: [TypeORM](https://typeorm.io/) - Object-Relational Mapping
42+
- **Caching**: [Redis](https://redis.io/) - In-memory data store
43+
- **Authentication**:
44+
- [JWT](https://jwt.io/) - JSON Web Tokens
45+
- [OAuth2](https://oauth.net/2/) - Authorization framework
46+
- **API Documentation**: [Swagger/OpenAPI](https://swagger.io/) - API documentation
47+
- **Testing**:
48+
- [Jest](https://jestjs.io/) - Testing framework
49+
- [Supertest](https://github.com/visionmedia/supertest) - HTTP testing
50+
51+
### Key Features
52+
53+
- All features from RealWorld API
54+
- OAuth2 authentication support
55+
- Redis caching for performance optimization
56+
- MySQL database integration
57+
- Enhanced security features
58+
- Rate limiting
59+
- Request validation
60+
- Advanced error handling
61+
- Performance monitoring with New Relic
62+
- Error tracking with Sentry
63+
64+
## Web Application
65+
66+
The web application is the frontend implementation.
67+
68+
### Frontend Stack
69+
70+
- **Framework**: [React](https://reactjs.org/) - JavaScript library for building user interfaces
71+
- **Language**: [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript
72+
- **State Management**: [Redux Toolkit](https://redux-toolkit.js.org/) - State management
73+
- **Styling**: [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
74+
- **Testing**:
75+
- [Jest](https://jestjs.io/) - Testing framework
76+
- [React Testing Library](https://testing-library.com/) - React component testing
77+
- **Build Tool**: [Vite](https://vitejs.dev/) - Next generation frontend tooling
78+
79+
### Key Features
80+
81+
- Modern React with hooks
82+
- Responsive design
83+
- Component-based architecture
84+
- State management with Redux
85+
- Unit and integration testing
86+
- TypeScript for type safety
87+
- Tailwind CSS for styling
88+
- Vite for fast development
89+
90+
## Shared Packages
91+
92+
The project includes several shared packages used across different profiles:
93+
94+
### API Package (`@repo/api`)
95+
96+
- Common API utilities
97+
- Shared DTOs
98+
- API response types
99+
- Error handling
100+
- Validation decorators
101+
- Common interfaces
102+
103+
### Database Packages
104+
105+
#### TypeORM Package (`@repo/database-typeorm`)
106+
107+
- TypeORM configurations
108+
- Database migrations
109+
- Entity definitions
110+
- Repository patterns
111+
- Query builders
112+
113+
#### MySQL Package (`@repo/mysql-typeorm`)
114+
115+
- MySQL specific configurations
116+
- MySQL migrations
117+
- MySQL entity definitions
118+
- MySQL query optimizations
119+
120+
### Nest Common Package (`@repo/nest-common`)
121+
122+
- Shared NestJS modules
123+
- Common services
124+
- Utility functions
125+
- Custom decorators
126+
- Guards and interceptors
127+
- Exception filters
128+
129+
### UI Package (`@repo/ui`)
130+
131+
- Reusable React components
132+
- Shared styles
133+
- Design system
134+
- Component documentation
135+
- Storybook integration
136+
137+
## Development Tools
138+
139+
- **Package Manager**: [pnpm](https://pnpm.io/) - Fast, disk space efficient package manager
140+
- **Build System**: [Turborepo](https://turbo.build/) - High-performance build system
141+
- **Code Quality**:
142+
- [ESLint](https://eslint.org/) - Code linting
143+
- [Prettier](https://prettier.io/) - Code formatting
144+
- [Husky](https://typicode.github.io/husky/) - Git hooks
145+
- [lint-staged](https://github.com/okonet/lint-staged) - Run linters on staged files
146+
- **Version Control**: [Git](https://git-scm.com/) - Distributed version control
147+
- **CI/CD**: [GitHub Actions](https://github.com/features/actions) - Continuous Integration/Deployment
148+
- **Containerization**: [Docker](https://www.docker.com/) - Container platform
149+
- **Documentation**:
150+
- [Next.js](https://nextjs.org/) - React framework for documentation
151+
- [MDX](https://mdxjs.com/) - Markdown with JSX
152+
- [Tailwind CSS](https://tailwindcss.com/) - Styling documentation

apps/realworld-api/README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@
88

99
Backend API for the RealWorld application, built with NestJS. This is part of the NestJS Turborepo monorepo.
1010

11+
## Tech Stack
12+
13+
### Backend
14+
15+
- **Framework**: [NestJS](https://nestjs.com/) - A progressive Node.js framework with Fastify HTTP engine
16+
- **Language**: [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript
17+
- **Database**: [PostgreSQL](https://www.postgresql.org/), [MySQL](https://www.mysql.com/) - Relational databases
18+
- **ORM**: [TypeORM](https://typeorm.io/) - Object-Relational Mapping
19+
- **Authentication**: [JWT](https://jwt.io/) - JSON Web Tokens
20+
- **API Documentation**: [Swagger/OpenAPI](https://swagger.io/) - API documentation
21+
- **Testing**:
22+
- [Jest](https://jestjs.io/) - Testing framework
23+
- [Supertest](https://github.com/visionmedia/supertest) - HTTP testing
24+
25+
### Development Tools
26+
27+
- **Package Manager**: [pnpm](https://pnpm.io/) - Fast, disk space efficient package manager
28+
- **Build Tool**: [Turborepo](https://turbo.build/) - High-performance build system
29+
- **Code Quality**:
30+
- [ESLint](https://eslint.org/) - Code linting
31+
- [Prettier](https://prettier.io/) - Code formatting
32+
- **Version Control**: [Git](https://git-scm.com/) - Distributed version control
33+
- **CI/CD**: [GitHub Actions](https://github.com/features/actions) - Continuous Integration/Deployment
34+
- **Containerization**: [Docker](https://www.docker.com/) - Container platform
35+
36+
### Monitoring & Performance
37+
38+
- **Logging**: [Pino](https://github.com/iamolegga/nestjs-pino) - Fast Node.js logger
39+
1140
## Features
1241

1342
- User authentication (registration, login)
@@ -117,7 +146,7 @@ pnpm --filter=realworld-api test:cov
117146

118147
## API Documentation
119148

120-
Access Swagger UI at: `http://localhost:3000/api-docs`
149+
Access Swagger UI at: `http://localhost:8001/api-docs`
121150

122151
## Deployment
123152

@@ -143,7 +172,7 @@ pm2 start dist/main.js --name realworld-api
143172

144173
## Development Process
145174

146-
1. Create a new branch from `main`
175+
1. Create a new branch from `develop`
147176
2. Make changes
148177
3. Write tests
149178
4. Create pull request

0 commit comments

Comments
 (0)