https://github.com/itsferdiardiansa/media-app
A scalable, containerized, and serverless media application built using a modern tech stack. Using monorepo to simplifies development, testing, and deployment.
https://github.com/itsferdiardiansa/media-app
aws aws-cognito aws-rds-postgres codecov docker jest microservices nest nextjs typescript
Last synced: 8 months ago
JSON representation
A scalable, containerized, and serverless media application built using a modern tech stack. Using monorepo to simplifies development, testing, and deployment.
- Host: GitHub
- URL: https://github.com/itsferdiardiansa/media-app
- Owner: itsferdiardiansa
- License: mit
- Created: 2024-10-30T07:25:58.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-14T06:31:20.000Z (8 months ago)
- Last Synced: 2025-02-14T07:29:22.089Z (8 months ago)
- Topics: aws, aws-cognito, aws-rds-postgres, codecov, docker, jest, microservices, nest, nextjs, typescript
- Language: TypeScript
- Homepage:
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Media Application Monorepo 📸
A scalable, containerized, and serverless media application built using a modern tech stack. This monorepo structure simplifies development, testing, and deployment.
## Tech Stack 🚀
| Dependency | Description |
| ---------------- | --------------------------------------------------------------------------------------------------------------------- |
| [](https://serverless-stack.com/) | **Serverless Stack (SST)**: Manages AWS resources with serverless deployment. |
| [](https://nestjs.com/) | **NestJS**: Backend framework for building server-side applications in TypeScript. |
| [](https://nextjs.org/) | **Next.js**: Framework for server-rendered React applications. |
| [](https://www.typescriptlang.org/) | **TypeScript**: Typed JavaScript for safer and more scalable code. |
| [](https://styled-components.com/) | **Styled Components**: CSS-in-JS for styling React components. |
| [](https://www.docker.com/) | **Docker**: Containerizes the app for consistent deployment. |
| [](https://nx.dev/) | **Nx Monorepo**: Manages multiple projects and shared libraries within one repo. |
| [](https://pnpm.io/) | **pnpm Workspaces**: Efficiently manages dependencies across the monorepo. |
| [](https://github.com/features/actions) | **GitHub Actions**: Automates testing, building, and deployment workflows. |---
## Prerequisites 🔧
| Tool | Version |
| ----------------------- | ------------ |
| [](https://nodejs.org/) | >= 16.x |
| [](https://pnpm.io/) | Latest version |
| [](https://www.docker.com/) | Latest version |
| [](https://aws.amazon.com/cli/) | Latest version |
| [](https://docs.serverless-stack.com/) | Latest version |---
## Getting Started 🛠️
### Project Structure 📂
```plaintext
media-app/
├── apps/
│ ├── api/ # NestJS Rest API
│ ├── client/ # Next.js Frontend application
│ └── sst-infra/ # SST infrastructure configuration
├── libs/ # Shared libraries for all apps
├── .github/workflows/ # GitHub Actions for CI/CD
├── Dockerfile # Docker configuration for containerizing the app
└── pnpm-workspace.yaml # pnpm workspace configuration
```### Installation 📝
1. **Clone the repository**:
```bash
git clone https://github.com/itsferdiardiansa/Media-App.git
cd media-app
```2. **Install dependencies**:
```bash
pnpm install
```3. **Set up environment variables**:
Copy `.env.example` to `.env` in each app (`apps/api`, `apps/client`, etc.) and fill in the required values.
4. **Running the Applications**:
- **api (NestJS)**:
```bash
Command to run api here...
```- **client (Next.js)**:
```bash
Command to run clients here...
```- **SST Infrastructure**:
To start SST for local development (uses AWS resources):
```bash
Commands to run sst here...
```5. **Docker**:
Build and run the Docker container:
```bash
Commands to run docker here...
```### Running Tests ✅
Use Nx to run tests for each application:
```bash
Commands to run the test here...
```### Deployment 🚀
The project uses **GitHub Actions** for CI/CD. Any push to the `main` branch triggers a workflow to:
1. Build the Docker image.
2. Deploy the serverless stack to AWS.#### Manual Deployment
To manually deploy the SST stack to AWS:
```bash
Command to deploy here...
```## License 📜
This project is licensed under the MIT License.
---
## Additional Notes 📘
- **Nx Monorepo**: Nx makes managing multiple apps and libraries easier, all in a single repo.
- **pnpm Workspace**: Efficient dependency management, speeding up installation and reducing duplicate packages.
- **GitHub Actions**: CI/CD workflows ensure consistent testing and deployment.