Skip to content

Commit 1d4d8c8

Browse files
committed
fix(backend): hardcode frontend URL for CORS
1 parent b461ca6 commit 1d4d8c8

2 files changed

Lines changed: 19 additions & 29 deletions

File tree

README.md

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# ProjectFlow
22

3-
A full-stack project management application built to streamline project tracking, enhance task management, and foster team collaboration.
3+
A full-stack project management application designed for efficient project tracking, task management, and team collaboration.
44

55
## Core Features
66

7-
- **Project Tracking**: Full CRUD operations for projects, including status tracking (Active, On Hold, Completed), priority levels, and deadline management.
8-
- **Task Management**: Comprehensive task creation and management with assignees, priority, status (To Do, In Progress, Review, Completed), and time estimation.
9-
- **Dashboard & Analytics**: A high-level overview of all projects with key metrics, including real-time progress statistics and visual indicators for overdue items.
10-
- **Team Collaboration**: Designed for teams to share workspaces and track progress collectively.
11-
- **Responsive Design**: A clean and intuitive interface that works seamlessly across desktop and mobile devices.
7+
- **Project Tracking**: Comprehensive management of projects, including status (Active, On Hold, Completed), priority levels, and deadline oversight.
8+
- **Task Management**: Detailed task creation and tracking with assignment capabilities, priority settings, status updates (To Do, In Progress, Review, Completed), and time estimation.
9+
- **Dashboard & Analytics**: A centralized overview providing key project metrics, real-time progress statistics, and visual indicators for critical items.
10+
- **Team Collaboration**: Facilitates shared workspaces and collective progress tracking for effective teamwork.
11+
- **Responsive Design**: An intuitive and clean user interface optimized for seamless experience across desktop and mobile devices.
1212

1313
## Technology Stack
1414

15-
This application is built with a modern, full-stack architecture:
15+
This application is built upon a robust, full-stack architecture:
1616

1717
- **Frontend**:
1818
- React
@@ -30,37 +30,27 @@ This application is built with a modern, full-stack architecture:
3030

3131
## API Endpoints
3232

33-
The backend provides a RESTful API for managing projects and tasks.
33+
The backend exposes a RESTful API for interaction with project and task resources.
3434

3535
### Projects API
3636

3737
| Method | Endpoint | Description |
3838
| :--- | :--- | :--- |
39-
| `GET` | `/api/projects` | Retrieve all projects. |
40-
| `POST` | `/api/projects` | Create a new project. |
41-
| `GET` | `/api/projects/:id` | Get a single project by its ID. |
42-
| `PUT` | `/api/projects/:id` | Update a project. |
43-
| `DELETE` | `/api/projects/:id` | Delete a project. |
44-
| `GET` | `/api/projects/:id/stats` | Get detailed statistics for a project. |
39+
| `GET` | `/api/projects` | Retrieves all projects. |
40+
| `POST` | `/api/projects` | Creates a new project. |
41+
| `GET` | `/api/projects/:id` | Fetches a single project by its ID. |
42+
| `PUT` | `/api/projects/:id` | Updates an existing project. |
43+
| `DELETE` | `/api/projects/:id` | Deletes a project. |
44+
| `GET` | `/api/projects/:id/stats` | Provides detailed statistics for a specific project. |
4545

4646
### Tasks API
4747

4848
| Method | Endpoint | Description |
4949
| :--- | :--- | :--- |
50-
| `POST` | `/api/tasks` | Create a new task. |
51-
| `PUT` | `/api/tasks/:id` | Update a task. |
52-
| `DELETE` | `/api/tasks/:id` | Delete a task. |
53-
54-
## Contributing
55-
56-
Contributions are welcome. Please follow these steps:
57-
58-
1. Fork the repository.
59-
2. Create a new feature branch (`git checkout -b feature/YourFeature`).
60-
3. Commit your changes (`git commit -m 'Add YourFeature'`).
61-
4. Push to the branch (`git push origin feature/YourFeature`).
62-
5. Open a Pull Request.
50+
| `POST` | `/api/tasks` | Creates a new task. |
51+
| `PUT` | `/api/tasks/:id` | Updates an existing task. |
52+
| `DELETE` | `/api/tasks/:id` | Deletes a task. |
6353

6454
## License
6555

66-
This project is licensed under the MIT License. See the `LICENSE` file for more information.
56+
This project is licensed under the MIT License. Refer to the `LICENSE` file for complete details.

backend/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const authenticateToken = async (req, res, next) => {
7474
// CORS configuration - Allow all origins in development
7575
const corsOptions = {
7676
origin: process.env.NODE_ENV === 'production'
77-
? process.env.FRONTEND_URL || 'https://your-frontend-domain.com'
77+
? 'https://project-flow-je8bqj9iy-dev-harshhh18s-projects.vercel.app'
7878
: ['http://localhost:3000', 'http://127.0.0.1:3000'], // Allow both localhost variants
7979
credentials: true,
8080
optionsSuccessStatus: 200,

0 commit comments

Comments
 (0)