Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.

Commit 3417275

Browse files
authored
Merge pull request #12 from OS-Builders/dev
Dev
2 parents 24752c6 + fb11415 commit 3417275

13 files changed

Lines changed: 28 additions & 75 deletions

File tree

README.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Task Pro
22

3-
Task Pro is an intuitive web application crafted to streamline project and task management.
3+
Task Pro is an intuitive web application crafted to streamline project and task management.
44

5-
It empowers users of all proficiency levels to enhance their time management and organizational abilities with its user-friendly interface.
5+
It empowers users of all proficiency levels to enhance their time management and organizational abilities with its user-friendly interface.
66

77
Whether you opt for private usage or collaboration, Task Pro offers a comprehensive solution for creating, organizing, and sharing projects seamlessly.
88

@@ -11,47 +11,45 @@ Whether you opt for private usage or collaboration, Task Pro offers a comprehens
1111
![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB) ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white) ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E) ![React Router](https://img.shields.io/badge/React_Router-CA4245?style=for-the-badge&logo=react-router&logoColor=white) ![SASS](https://img.shields.io/badge/SASS-hotpink.svg?style=for-the-badge&logo=SASS&logoColor=white) ![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white) ![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge&logo=mongodb&logoColor=white) ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)
1212

1313
## Project Frames
14-
![Project Frame](src/assets/projectFrame.png)
15-
1614

15+
![Project Frame](src/assets/projectFrame.png)
1716

1817
## Features
1918

2019
### User Sign-Up and Login
20+
2121
- Easily create a user profile to personalize user experience.
2222
- Secure authentication ensures your private boards are only accessible to you.
2323

24-
2524
![Authentication](src/assets/authPage.png)
2625

27-
28-
2926
### Board Management
30-
- Create new board with ease.
31-
- Organize your task for different stage for efficiently managing a project.
3227

28+
- Create, edit and delete boards with ease.
29+
- Instantly swap between boards to display their corresponding tasks.
30+
- All changes to boards and tasks are maintained on the frontend and backend.
3331

3432
![Dashboard](src/assets/Dashboard.png)
3533

34+
### Task Management
3635

37-
![taskCreation](src/assets/taskCreation.png)
38-
39-
36+
- Create any number of new task cards with name, notes and status.
37+
- Edit and delete task cards as needed.
38+
- Move cards from one status column to another.
4039

40+
![taskCreation](src/assets/taskCreation.png)
4141

42-
## Front End
42+
## Front End
4343

4444
- Developed using **React** for a responsive and dynamic user interface.
4545
- Utilizes **React Router** for smooth navigation between pages.
4646
- Stylish and customizable design with **SASS** for a modern look and organized styling.
4747

48-
4948
## Back End
5049

5150
- Powered by **Node.js** and **Express** for robust server-side functionality.
5251
- Data storage and retrieval are handled by **MongoDB**, ensuring data persistence and flexibility.
5352

54-
5553
## Stretch Features
5654

5755
In the future, we plan to introduce the following features:
@@ -63,25 +61,20 @@ In the future, we plan to introduce the following features:
6361
- Light and Dark mode.
6462
- OTP/Email 2 step authentication.
6563

66-
67-
68-
6964
## To Launch the Application
7065

71-
**Step 1**. Clone repo to code editor
66+
**Step 1**. Clone repo to code editor
7267

73-
**Step 2**. Run npm install to install all dependencies
68+
**Step 2**. Run npm install to install all dependencies
7469

75-
**Step 3**. Make sure node version is 18.17.1 or older, can use nvm to install the needed version.
70+
**Step 3**. Make sure node version is 18.17.1 or older, can use nvm to install the needed version.
7671

77-
**Step 4**. Create env file and make sure to have ```PORT = 3000``` and ```MONGO_URI = (Mongodb connection URI)```
78-
79-
**Step 5**. start the project with ```npm start``` or ```npm run dev``` (for dev mode)
72+
**Step 4**. Create env file and make sure to have `PORT = 3000` and `MONGO_URI = (Mongodb connection URI)`
8073

74+
**Step 5**. start the project with `npm start` or `npm run dev` (for dev mode)
8175

8276
## Authors
8377

8478
- Nam Ha: [Github](https://github.com/namos2502)
8579

8680
- John Costello: [Github](https://github.com/johnlcos)
87-

server/controllers/boardsController.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BoardListItemState, BoardType } from "../../src/types.ts";
66
const boardsController = {
77
getMyBoards: async (req: Request, res: Response, next: NextFunction) => {
88
try {
9-
// find all boards beloning to the user, push board names into an array and save on locals
9+
// find all boards from the user, push board names into an array and save on locals
1010
const user = await User.findOne({ _id: req.params.userId }).populate(
1111
"boards"
1212
);
@@ -144,7 +144,6 @@ const boardsController = {
144144
await Board.findOneAndDelete({
145145
_id: req.params.boardId,
146146
});
147-
console.log("board deleted");
148147
return next();
149148
} catch (err) {
150149
// pass error through to global error handler
@@ -164,7 +163,6 @@ const boardsController = {
164163
},
165164
{ new: true }
166165
);
167-
console.log("editedBoard: ", editedBoard);
168166
res.locals.board = editedBoard;
169167
return next();
170168
} catch (err) {

server/controllers/userController.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ const userController = {
4141

4242
// middleware for verifying a user on login
4343
verifyUser: async (req: Request, res: Response, next: NextFunction) => {
44-
// obtain user name password from request body
4544
// obtain user name password from request body
4645
const { username, password } = req.body;
4746
// check for a missing input
48-
// check for a missing input
4947
if (!username || !password) {
5048
return next({
5149
log: "Missing username or password in verifyUser",
@@ -54,23 +52,19 @@ const userController = {
5452
});
5553
}
5654
try {
57-
// search DB for the user based on the username
5855
// search DB for the user based on the username
5956
const user = await User.findOne({ username });
6057
// if now user is found error out
61-
// if now user is found error out
6258
if (!user) {
6359
return next({
6460
log: `userController.verifyUser ERROR: no user with input username found in DB`,
6561
status: 400,
6662
message: { err: "Invalid username or password" },
6763
});
6864
} else {
69-
// else a user is found, check passwords
7065
// else a user is found, check passwords
7166
const resultPassword = await bcrypt.compare(password, user.password);
7267
// if passwords do not match error out
73-
// if passwords do not match error out
7468
if (!resultPassword) {
7569
return next({
7670
log: `userController.verifyUser ERROR: input password does not match stored password`,
@@ -89,12 +83,6 @@ const userController = {
8983
status: 500,
9084
message: { err: "Error occured creating user" },
9185
});
92-
// send any errors to global error handler
93-
return next({
94-
log: `usersController.createUser ERROR: ${err}`,
95-
status: 500,
96-
message: { err: "Error occured creating user" },
97-
});
9886
}
9987
},
10088
};

server/routes/boardsRouter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ router.get(
1818
}
1919
);
2020

21+
// route for getting all tasks associated with a board
2122
router.get(
2223
"/board",
2324
boardsController.getCurrentBoard,
@@ -27,6 +28,7 @@ router.get(
2728
}
2829
);
2930

31+
// route for creating a new baord
3032
router.post(
3133
"/create",
3234
boardsController.createBoard,

src/assets/Dashboard.png

-187 KB
Loading

src/assets/taskCreation.png

-100 KB
Loading

src/components/Column.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,19 @@ const Column = ({
1111
boardState,
1212
setBoardState,
1313
}: ColumnProps) => {
14-
// state for rendering new task modal
1514
const [addingTask, setAddingTask] = useState<boolean>(false);
16-
17-
// state for number of tasks in a column
1815
const [numTasks, setNumTasks] = useState<number>(0);
19-
20-
// state for storing task card components
2116
const [taskCards, setTaskCards] = useState<ReactNode[]>([]);
22-
23-
// state for editing a task card
2417
const [editingTask, setEditingTask] = useState<TaskState | null>(null);
2518

26-
// render new task modal on button click
2719
const handleNewTask = () => {
2820
setAddingTask(true);
2921
};
3022

3123
//effect for rendering cards
3224
useEffect(() => {
3325
const column = boardState[name];
34-
console.log("Column column: ", column);
3526
setNumTasks(column.length);
36-
// map column to an array of task card components and then set as the state
3727
const cardsArray = column.map((task: TaskState) => {
3828
return (
3929
<Card info={task} setEditingTask={setEditingTask} key={task._id} />

src/components/CreateBoardModal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ const CreateBoardModal = ({
3434
},
3535
body: JSON.stringify(body),
3636
});
37-
// receive username and id from backend
38-
// if request success, save username to state and route to dashboard
37+
// receive board name and id from backend
3938
if (response.status === 200) {
4039
const responseData = await response.json();
41-
console.log("Board created: ", responseData);
4240
const newBoardListItem = (
4341
<button
4442
className={`board-selector ${
@@ -61,7 +59,7 @@ const CreateBoardModal = ({
6159
}
6260
};
6361

64-
const isButtonDisabled: boolean = boardName === ""; //checking if boardName is empty? using trim in handle input
62+
const isButtonDisabled: boolean = boardName === "";
6563

6664
return createPortal(
6765
<div className="modal-overlay">

src/components/EditBoardModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const EditBoardModal = ({
2929
},
3030
body: JSON.stringify(body),
3131
});
32-
// if request success, update currentBoard
32+
// receive board name and id from backend
3333
if (response.status === 200) {
3434
const responseData = await response.json();
3535
setCurrentBoard({ name: responseData.name, id: responseData._id });
@@ -58,7 +58,7 @@ const EditBoardModal = ({
5858
fetchDeleteBoard().catch(console.error);
5959
};
6060

61-
const isButtonDisabled: boolean = boardName === ""; //checking if boardName is empty? using trim in handle input
61+
const isButtonDisabled: boolean = boardName === "";
6262

6363
return createPortal(
6464
<div className="modal-overlay">

src/components/EditTaskModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const EditTaskModal = ({
2424
const handleFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {
2525
e.preventDefault;
2626
console.log("Edit Task Form Submitted: ", formData);
27-
// send POST request with the new task card, edited task and current board
27+
// send POST request with the edited task, originla column and current board
2828
const fetchEditTask = async () => {
2929
const body = {
3030
...formData,

0 commit comments

Comments
 (0)