Skip to content

Muhammad-Abdullah012/scrapper_zameen_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrapper Zameen Backend

This is the backend for the scrapper_zameen application. It provides RESTful APIs to support the frontend application and manages the core business logic and data storage.

Table of Contents

Getting Started

These instructions will help you set up and run the backend project on your local machine for development and testing purposes.

Prerequisites

Make sure you have the following software installed on your machine:

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/Muhammad-Abdullah012/scrapper_zameen_backend.git
cd scrapper_zameen_backend
  1. Install the project dependencies using pnpm:
pnpm install

Configuration

  1. Create a .env file in the root directory of the project and configure your environment variables. You can use the .env.example file as a template:
cp .env.example .env
  1. Edit the .env file and provide the necessary configuration values.

Running the Project

To start the project in development mode, run the following command:

pnpm dev

The server will start using the port specified in your .env file. By default, you can access it at http://localhost:5000 if PORT is set to 5000 in .env file.

Running Tests

To run the tests, use the following command:

pnpm test

Running with Docker

You can also run the project using Docker and Docker Compose.

You'll need to clone and run the following projects (if using docker):

Docker Commands

To build and start the Docker containers in development mode, run the following command:

pnpm deploy:dev

This command is defined in the package.json file and uses Docker Compose to build and start the containers.

To stop the Docker containers, use the following command:

docker compose down

API Documentation

The API documentation is available via Swagger. Once the server is running, you can access the Swagger UI at:

    ### If server is running on port 5000 (depends on PORT in .env)
    http://localhost:5000/api-docs

Folder Structure

Here is a brief overview of the project's folder structure:

│
├──📂 .vscode
│  ├── launch.json
│  └── settings.json
|
|──📂 migrations
|  └── migraion-files
│
├──📂 src
│  ├──📂 config
│  │  |── index.ts
|  |  |── config.js
|  |  └── sequelize.ts
│  │
│  ├──📂 controllers
│  │  ├── auth.controller.ts
|  |  ├── property.controller.ts
│  │  └── users.controller.ts
│  │
│  ├──📂 dtos
│  │  └── users.dto.ts
│  │
│  ├──📂 exceptions
│  │  └── HttpException.ts
│  │
│  ├──📂 http
│  │  ├── auth.http
│  │  └── users.http
│  │
│  ├──📂 interfaces
│  │  ├── auth.interface.ts
│  │  ├── routes.interface.ts
│  │  └── users.interface.ts
│  │
│  ├──📂 middlewares
│  │  ├── auth.middleware.ts
│  │  ├── error.middleware.ts
|  |  ├── pagination.middleware.ts
│  │  └── validation.middleware.ts
│  │
│  ├──📂 models
│  │  └── users.model.ts
│  │
│  ├──📂 routes
│  │  ├── auth.route.ts
|  |  ├── property.route.ts
│  │  └── users.route.ts
│  │
│  ├──📂 services
│  │  ├── auth.service.ts
|  |  ├── property.service.ts
│  │  └── users.service.ts
│  │
│  ├──📂 test
│  │  ├── auth.test.ts
|  |  ├── property.test.ts
│  │  └── users.test.ts
│  │
│  ├──📂 utils
│  │  ├── logger.ts
│  │  └── vaildateEnv.ts
│  │
│  ├── app.ts
│  └── server.ts
│
├── .dockerignore
├── .editorconfig
├── .env.development.local
├── .env.production.local
├── .env.test.local
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .huskyrc
├── .lintstagedrc.json
├── .prettierrc
├── .swcrc
├── docker-compose.yml
├── Dockerfile.dev
├── Dockerfile.prod
├── ecosystem.config.js
├── jest.config.js
├── Makefile
├── nginx.conf
├── nodemon.json
├── package-lock.json
├── package.json
├── swagger.yaml
└── tsconfig.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published