https://github.com/idrsdev/transfer-market
https://github.com/idrsdev/transfer-market
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/idrsdev/transfer-market
- Owner: idrsdev
- Created: 2025-01-10T13:04:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-02T20:12:45.000Z (over 1 year ago)
- Last Synced: 2025-02-02T21:20:12.296Z (over 1 year ago)
- Language: TypeScript
- Size: 218 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Football Manager Transfer Market
## Description
This project is a full-stack application for managing a football transfer market. It consists of a Node.js backend and a React frontend, utilizing TypeScript for type safety. The application is containerized using Docker and served with Nginx.
## Technologies Used
- **Backend**: Node.js, Express, TypeScript, MongoDB
- **Frontend**: React, Vite, TypeScript
- **Containerization**: Docker
- **Web Server**: Nginx
- **Code Quality**: ESLint, Prettier
## Prerequisites
Before you begin, ensure you have the following installed on your local machine:
- [Docker](https://www.docker.com/get-started)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Node.js](https://nodejs.org/) (for local development)
- [npm](https://www.npmjs.com/) (comes with Node.js)
## Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/idrsdev/transfer-market.git
cd transfer-market
```
### 2. Set Up Environment Variables
Copy the example environment file for the backend:
```bash
cp backend/.env.example backend/.env
```
Edit the `.env` file to configure your environment variables, such as database connection strings and secrets.
### 3. Install Dependencies (Optional for Local Development)
If you want to run the backend or frontend locally without Docker, install the necessary dependencies:
#### Backend
```bash
cd backend
npm install
```
#### Frontend
```bash
cd frontend
npm install
```
### 4. Running the Application Locally
To run the backend and frontend locally, you can use the following commands:
#### Start the Backend
```bash
cd backend
npm run dev # or npm run build && npm start
```
#### Start the Frontend
```bash
cd frontend
npm run dev # or npm run build && npm run preview
```
### 5. Running the Application with Docker
To run the application using Docker, follow these steps:
#### Build and Start Containers
```bash
docker-compose up --build # or docker compose up (depending upon your compose installation)
```
This command will:
- Build the Docker images for the frontend and backend.
- Start the containers and set up the network.
#### Access the Application
- The frontend will be accessible at `http://localhost:80`.
- The backend API will be accessible at `http://localhost:5000/api`.
### 6. Stopping the Application
To stop the running containers, use:
```bash
docker-compose down
```
### 7. Cleaning Up
To remove all stopped containers and unused images, you can run:
```bash
docker system prune
```
## Additional Notes
- Ensure that MongoDB is running if you are not using a Dockerized version.
- You can run MongoDB locally or use a cloud service like MongoDB Atlas.
- Make sure you can access your MongoDB instance from the backend service.