This repository contains a full-stack application for user management. It consists of a frontend React application, a backend Node.js application with Prisma and PostgreSQL for data storage, and a Docker Compose configuration for easy deployment.
- Prerequisites
- Backend
- Frontend
- Database
- Docker
- Getting Started
- Application Structure
- Usage
- Notes
- License
Ensure you have the following tools installed on your system:
- Defines a
User
model with fields:id
(auto-incremented integer),name
(string), andemail
(string). - Prisma client setup for interacting with the PostgreSQL database.
- Node.js application using Express.
- Exposes RESTful API endpoints for user CRUD operations.
- Utilizes Prisma as the database toolkit.
- React application for user management.
- Allows users to view, add, update, and delete user records.
- Communicates with the backend API for data operations.
- Used to store user data.
- Defined in the
docker-compose.yml
file with a dedicated service nameddb
. - Database URL is configured through the
DATABASE_URL
environment variable.
- Sets up containers for the frontend, backend, and database services.
- Defines necessary environment variables, volumes, and dependencies.
-
Clone this repository to your local machine:
git clone https://github.com/shubham1091/TinyDockerUser.git
-
Navigate to the project directory:
cd your-repository
-
Follow the specific setup instructions for the backend and frontend.
-
Build and run the Docker Compose services:
docker-compose up -d
-
Access the frontend application at http://localhost:3000.
- Backend: Node.js application files, Prisma schema, and setup.
- Frontend: React application files.
- Database: PostgreSQL setup and configuration.
- Docker: Docker Compose configuration.
- Interact with the frontend application to manage users.
- API requests from the frontend are handled by the backend.
- Database stores user records.
- Ensure backend and frontend dependencies are installed before running.
- Adjust environment variables and configurations as needed.
- Prisma client needs to be generated in the backend before running.
This project is licensed under the MIT License.