A Fullstack built with React, tRPC, Prisma, and MongoDB.
- Create: Allow users to create items that stored on mongoDB.
- Delete: Allow users to delete items that stored on mongoDB.
-
Clone the repository:
git clone https://github.com/Shaban-Eissa/React-tRPC-Prisma-MongoDB
-
Navigate to the project directory:
cd React-tRPC-Prisma-MongoDB
-
Install dependencies:
npm i --workspaces
-
Create .env file in server workspace:
DATABASE_URL=your_mongodb_url
-
Open terminal and write
npx prisma db push
. used to update the database schema to match your Prisma schema. It creates tables in the database if they don't exist, and updates existing tables if they are different. -
Open terminal and write
npx prisma generate
. used to generate the Prisma Client based on your Prisma schema.
- Start the development server:
npm run dev
- To access React application visit http://localhost:3000.
- To access the API visit http://localhost:3000/trpc/todo.list.
This project utilizes a robust stack of modern technologies for efficient development and optimal user experience:
- React
- Typescript
- tRPC
- Prisma
- MongoDB
- Tailwind CSS
Contributions are welcome! Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature/bugfix:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-name
. - Open a pull request.