Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getange/xata-t2g
This repository contains a project that we worked on as a group as part of the Teach2Give program bootcamp
https://github.com/getange/xata-t2g
Last synced: 3 months ago
JSON representation
This repository contains a project that we worked on as a group as part of the Teach2Give program bootcamp
- Host: GitHub
- URL: https://github.com/getange/xata-t2g
- Owner: GETANGE
- Created: 2024-10-14T15:59:45.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T18:34:21.000Z (3 months ago)
- Last Synced: 2024-10-25T06:36:19.825Z (3 months ago)
- Language: TypeScript
- Size: 969 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🌟 Task Manager
## 📝 Overview
This project is a web application where users can create and manage projects. It involves a backend built with **Express.js**, a frontend built with **React**, and **Xata** as the database solution. This README will guide you through setting up and running the project from scratch.
## 📑 Table of Contents
1. [Prerequisites](#prerequisites)
2. [Project Setup](#project-setup)
- [Backend (Express)](#backend-express)
- [Database (Xata)](#database-xata)
- [Frontend (React)](#frontend-react)
3. [Running the Project](#running-the-project)
4. [API Documentation](#api-documentation)
5. [Environment Variables](#environment-variables)
6. [Technologies Used](#technologies-used)
7. [Contributing](#contributing)---
## 🔧 Prerequisites
Before you begin, ensure you have the following installed:
- **Node.js**: [Download](https://nodejs.org/) 🌍
- **npm** or **pnpm**: Comes with Node.js, but you can install [pnpm](https://pnpm.io/) as an alternative package manager 🚀
- **Xata CLI**: [Installation Guide](https://xata.io/docs/cli/install) 🛠️
- **Git**: [Download](https://git-scm.com/) 🧑💻---
## ⚙️ Project Setup
### 🔙 Backend (Express)
1. **Clone the repository**:
```bash
git clone 📦
cd 🗂️
2. **Install all dependencies**:
```bash
Copy code
pnpm install # or npm install
Set up environment variables: In the root of the project directory, create a .env file and add the following:bash
Copy code
PORT=5000
DATABASE_URL=
Run the backend server:
bash
Copy code
pnpm run dev # or npm run dev
The backend server will start at http://localhost:5000.3. **💽 Database (Xata)**:
```bash
Install the Xata CLI:bash
Copy code
pnpm add -g @xata.io/cli # or npm install -g @xata.io/cli
Login to Xata:
bash
Copy code
xata auth login
Set up your database:
bash
Copy code
xata init
Push your schema to Xata:
bash
Copy code
xata push
4. **🖥️ Frontend (React)**:
```bash
Navigate to the frontend directory:bash
Copy code
cd ../frontend
Install frontend dependencies:
bash
Copy code
pnpm install # or npm install
Set up environment variables: In the frontend directory, create a .env file and add your backend URL:
bash
Copy code
REACT_APP_BACKEND_URL=http://localhost:5000
Run the React app:
bash
Copy code
pnpm run start # or npm run start
This will start the React app on http://localhost:3000.3. **🏃 Running the Project**:
```bash
Start the Backend: Navigate to the backend folder and run:
bash
Copy code
pnpm run dev # or npm run dev
Start the Frontend: Navigate to the frontend folder and run:
bash
Copy code
pnpm run start # or npm run start
Now both the frontend and backend should be running, and you can access the application at http://localhost:3000.4. **📖 API Documentation**:
```bash
POST /api/v1/project: Create a new project
GET /api/v1/project: Retrieve all projects
PATCH /api/v1/project/:id: Update a project
DELETE /api/v1/project/:id: Delete a project
POST /api/v1/teams: Create a new project
GET /api/v1/teams: Retrieve all projects
PATCH /api/v1/teams/:id: Update a project
DELETE /api/v1/teams/:id: Delete a projectPOST /api/v1/task: Create a new project
GET /api/v1/task: Retrieve all projects
PATCH /api/v1/task/:id: Update a project
DELETE /api/v1/project/:id: Delete a projectPOST /api/v1/comments: Create a new project
GET /api/v1/comments: Retrieve all projects
PATCH /api/v1/comments/:id: Update a project
DELETE /api/v1/comments/:id: Delete a project
5. **🌐 Environment Variables**:
```bash
PORT: The port on which the backend server will run (default: 5000).
DATABASE_URL: Your Xata database connection URL.
REACT_APP_BACKEND_URL: The URL of your backend server for the frontend app to communicate with.
🛠️ Technologies UsedBackend: Express.js
Frontend: React.js
Database: Xata
Package Manager: pnpm (or npm)
🤝 Contributing
Contributions are welcome! Feel free to open a Pull Request or create an issue if you find any bugs or have suggestions for improvements.Fork the project
Create your feature branch (git checkout -b feature/your-feature-name)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin feature/your-feature-name)
Open a Pull Request