Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/irfnd/irfandi-betest
Implementation for technical test Code.id
https://github.com/irfnd/irfandi-betest
confluent-kafka expressjs kafkajs mongodb-atlas prisma scalar typescript upstash-redis vercel
Last synced: about 23 hours ago
JSON representation
Implementation for technical test Code.id
- Host: GitHub
- URL: https://github.com/irfnd/irfandi-betest
- Owner: irfnd
- License: mit
- Created: 2024-10-30T10:12:51.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-10-30T13:30:26.000Z (about 2 months ago)
- Last Synced: 2024-11-11T14:48:43.999Z (about 1 month ago)
- Topics: confluent-kafka, expressjs, kafkajs, mongodb-atlas, prisma, scalar, typescript, upstash-redis, vercel
- Language: TypeScript
- Homepage: https://ms-irfandi-betest.onrender.com
- Size: 157 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Technical Test - Irfandi
Implementation for technical test [Code.id](https://www.code.id/)
## Features
- **Backend**: using [Express](https://expressjs.com/) + [TypeScript](https://www.typescriptlang.org/)
- **Logging**: using [Morgan](https://github.com/expressjs/morgan)
- **Environment vars**: using [Dotenv](https://github.com/motdotla/dotenv)
- **Security**: set security HTTP headers using [Helmet](https://helmetjs.github.io/)
- **CORS**: Cross-Origin Resource-Sharing enabled using [Cors](https://github.com/expressjs/cors)
- **Compression**: gzip compression with [Compression](https://github.com/expressjs/compression)
- **Database**: using [MongoDB Atlas](https://www.mongodb.com/atlas) with [Prisma](https://www.prisma.io)
- **Message Broker**: using [Kafka](https://kafka.apache.org/) ([KafkaJS](https://kafka.js.org/), [Confluent](https://www.confluent.io/))
- **Caching**: using [Redis](https://redis.io/) ([Upstash](https://upstash.com/))
- **API Documentation**: using [Scalar Docs](https://scalar.com/)
- **CI/CD**: deploy on [Render](https://render.com/)
- **Git hooks**: with [Husky](https://github.com/typicode/husky) and [Lint-staged](https://github.com/okonet/lint-staged)
- **Linting**: with [Eslint](https://eslint.org/) and [Prettier](https://prettier.io/)
- **Validations**: schema validation with [Zod](https://zod.dev/)## Get Started
- Clone this repo
```bash
git clone https://github.com/irfnd/irfandi-betest
```
- Rename this boilerplate to whatever you want and move to that folder
```bash
cd
```
- Install all packages
```bash
npm install
```
or
```bash
yarn
```
or
```bash
pnpm i
```
- Set up environment variables in `.env` file.```env
# Server
PORT=# MongoDB
DATABASE_URL=# Upstash Redis
UPSTASH_REDIS_URL=
UPSTASH_REDIS_TOKEN=# Hashing
HASHING_SALT="secret_irfandi_betest"# JWT
JWT_SECRET="secret-jwt_irfandi_betest"
JWT_EXPIRES_IN="1d"# Confluent Kafka Cluster
KAFKA_CLIENT_ID=
KAFKA_BROKER=
KAFKK_SASL_USERNAME=
KAFKA_SASL_PASSWORD=
```- Running project
```bash
pnpm start
```
or `development`
```bash
pnpm dev
```
- Project running on port `8080` _(default port)_
- Open `/docs` to see API documentation.## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
- Fork the Project
- Create your Feature Branch `git checkout -b feature/AmazingFeature`
- Commit your Changes `git commit -m 'Add some AmazingFeature`
- Push to the Branch `git push origin feature/AmazingFeature`
- Open a Pull Request## License
Distributed under the [MIT](https://github.com/irfnd/irfandi-betest/blob/master/LICENSE) License.