Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
a269f74
folder structure
Nicolinabl Feb 12, 2026
51c9d6a
routes
Nicolinabl Feb 12, 2026
10a377f
basic styling home page
Nicolinabl Feb 12, 2026
6881425
CreateQuest form added to home page
Nicolinabl Feb 15, 2026
0dbbf3b
basic styling login, signup, about, friend feed, home, quest library
Nicolinabl Feb 15, 2026
7df2987
list of endpoints
Feb 15, 2026
9df6ed7
added quest and user schemas
Feb 15, 2026
85080a6
user profile
Nicolinabl Feb 16, 2026
4d131cb
Added authorization, user routes
Feb 16, 2026
a8adfde
updated main routes
Feb 16, 2026
91fd798
updated more routes
Feb 16, 2026
b0d0f2f
updated delete route
Feb 17, 2026
3ed875b
quest page content, margin change on all components
Nicolinabl Feb 17, 2026
98bf0fd
added new routes, updated prev routes
Feb 17, 2026
65f2daa
Merge pull request #2 from Nicolinabl/julia-branch
Nicolinabl Feb 18, 2026
4d21d89
Merge pull request #1 from Nicolinabl/basic-styling
Nicolinabl Feb 18, 2026
c08ddf9
QuestList component
Nicolinabl Feb 18, 2026
dea4b1a
updated post route
Feb 18, 2026
8bd635b
Merge pull request #3 from Nicolinabl/basic-styling
Nicolinabl Feb 18, 2026
ae87ac2
Merge pull request #4 from Nicolinabl/mvp-features
Demijuls Feb 18, 2026
5b6e72f
updated api and components
Feb 18, 2026
773b8bb
Merge pull request #5 from Nicolinabl/mvp-features
Demijuls Feb 18, 2026
5d18f8b
signup and login connected to backend
Nicolinabl Feb 18, 2026
264b421
Merge pull request #6 from Nicolinabl/login
Nicolinabl Feb 19, 2026
69960b3
CreateQuest form connected to backend. User can now create a quest an…
Nicolinabl Feb 19, 2026
4765075
connection backend frontend
Nicolinabl Feb 19, 2026
b6e7a2c
Merge pull request #7 from Nicolinabl/create-quest
Nicolinabl Feb 19, 2026
a69cba6
updated routes and schemas
Feb 23, 2026
f7c3aca
updated friends feed components
Feb 23, 2026
c373594
check quest as complete
Nicolinabl Feb 24, 2026
0a27f6b
updated friends routes, updated feed components
Feb 24, 2026
8fca2db
Merge pull request #9 from Nicolinabl/checked-quest-endpoint
Nicolinabl Feb 25, 2026
2790513
frontend connection checked quest
Nicolinabl Feb 25, 2026
79f8b13
imported schemas
Nicolinabl Feb 25, 2026
b277fe3
bug
Nicolinabl Feb 25, 2026
5223c79
quest complete route
Nicolinabl Feb 25, 2026
36ab4e7
new route check quest, without chening user id
Nicolinabl Feb 25, 2026
a43ce5e
change import schemas
Nicolinabl Feb 25, 2026
ce04912
updated quest routes
Feb 25, 2026
5f5484b
blank state for profile page if user is not logged in
Nicolinabl Feb 25, 2026
2092975
update dependencies
Nicolinabl Feb 25, 2026
31dcd80
Merge branch 'main' into mvp-features
Demijuls Feb 25, 2026
b4d9d0d
Merge pull request #12 from Julia/mvp-features
Demijuls Feb 25, 2026
561c088
added controllers for routes, added seeding json, cleaned up server file
Feb 25, 2026
987f0ec
Merge branch 'main' into mvp-features-update
Demijuls Feb 25, 2026
d55bff7
Merge pull request #13 from Julia/mvp-features-update
Demijuls Feb 25, 2026
7544d20
type module update
Feb 25, 2026
2b3225b
fixed imports for Render
Feb 25, 2026
712f249
Temporary rename to fix casing
Feb 25, 2026
db1be77
Fixing casing for questController
Feb 25, 2026
bce7da5
changing import of json file to fix Render
Feb 25, 2026
2a795db
global state management with zustand, userStore
Nicolinabl Feb 26, 2026
9ae4ea7
zustand for global state management. Stor
Nicolinabl Feb 26, 2026
ed580e9
added seeding database with default quests
Feb 26, 2026
74d79b7
Merge pull request #16 from Nicolinabl/backend-updates
Nicolinabl Feb 26, 2026
9f390d3
Merge pull request #14 from Nicolinabl/state-management
Nicolinabl Feb 26, 2026
73ea9b5
Merge branch 'main' into profile-blank
Nicolinabl Feb 26, 2026
978181a
Merge pull request #15 from Nicolinabl/profile-blank
Nicolinabl Feb 26, 2026
5a1ad7a
Renaming controller temporary to fix naming
Feb 26, 2026
150c755
Renaming controller to fix naming
Feb 26, 2026
e8ee885
Merge pull request #17 from /backend-updates
Demijuls Feb 26, 2026
8489f40
get quest of the day
Nicolinabl Feb 26, 2026
4408aff
Merge pull request #18 from Nicolinabl/Get-daily-quest
Nicolinabl Feb 26, 2026
c829688
endpoints to show and copy library quests
Feb 26, 2026
463ecde
library quests routes updates
Feb 26, 2026
98bde71
Removed old incorrect QuestController
Feb 26, 2026
cf0ce5a
Merge pull request #20 from Julia/be-quest-routes
Demijuls Feb 26, 2026
e5c542b
root colors global style
Nicolinabl Feb 27, 2026
7234383
root colors update
Nicolinabl Feb 27, 2026
8400cf9
Merge pull request #21 from Nicolinabl/styling-global-styles
Nicolinabl Feb 27, 2026
898e050
bg color moved from * to body
Nicolinabl Feb 27, 2026
2f4277a
Merge pull request #22 from Nicolinabl/styling-global-styles
Nicolinabl Feb 27, 2026
2ef1fd7
added hamburger menu
Feb 27, 2026
40f48e1
error handling frontend add quest
Nicolinabl Feb 27, 2026
3b78bec
error handling frontend login
Nicolinabl Mar 1, 2026
787b30c
error handling frontend signup + log in automatically when signed up
Nicolinabl Mar 1, 2026
50bb3f1
imported fonts for roboto, pixely sans in html. Added fonts + font se…
Nicolinabl Mar 1, 2026
a8b4f30
Merge pull request #23 from Nicolinabl/styling-global-styles
Nicolinabl Mar 1, 2026
de1ad59
Merge pull request #25 from Nicolinabl/error-handling-signup
Nicolinabl Mar 2, 2026
9332ae4
Merge pull request #26 from Nicolinabl/error-handling-login
Nicolinabl Mar 2, 2026
d76392a
Merge pull request #27 from Nicolinabl/error-handling-create-quest
Nicolinabl Mar 2, 2026
33c6add
Merge pull request #24 from Nicolinabl/fe-styling
Nicolinabl Mar 2, 2026
a8b2ba0
useReducer hook instead of useState. Also added minor details in ques…
Nicolinabl Mar 2, 2026
a7a8fdb
fixed the check-as-done route
Mar 2, 2026
efc5394
streak route update
Mar 2, 2026
e9f938d
added route for streak count
Mar 2, 2026
bb19fc1
cleaned up routes
Mar 3, 2026
a356b5c
added css to header
Mar 3, 2026
7ccaef7
css for header fixes
Mar 3, 2026
9e5b305
updated styles for all pages, updated header style
Mar 3, 2026
71fb1c0
styling home page for unauthorized users. Icon components
Nicolinabl Mar 3, 2026
1ed5cab
styling get daily quest. Error message for submit on empty input
Nicolinabl Mar 3, 2026
c47e3a1
styling create quest
Nicolinabl Mar 3, 2026
de2d7e5
Small bug fix in backend upper- to lowercase on boolean, event.target…
Nicolinabl Mar 3, 2026
36be643
clean up
Mar 4, 2026
7d7e595
event.target.checked added to handleChecked
Nicolinabl Mar 4, 2026
905be6b
basic styling quesCards. NOT finished (check TODO comment)
Nicolinabl Mar 4, 2026
b99394c
hard coded library list + styling
Nicolinabl Mar 4, 2026
70f3528
Merge pull request #28 from css-styling
Demijuls Mar 4, 2026
b125c2b
Merge pull request #29 from Nicolinabl/styling-create-quest
Nicolinabl Mar 4, 2026
47d7b43
Merge pull request #30 from new-routes
Demijuls Mar 4, 2026
948a0da
Merge branch 'main' into useReducer-hook
Nicolinabl Mar 4, 2026
7f982a8
Merge pull request #31 from Nicolinabl/useReducer-hook
Nicolinabl Mar 4, 2026
bc15104
Merge branch 'main' into styling-home-unauth
Nicolinabl Mar 4, 2026
06e9340
Merge pull request #32 from Nicolinabl/styling-home-unauth
Nicolinabl Mar 4, 2026
42922dc
Merge pull request #33 from Nicolinabl/styling-useer-quest-list
Nicolinabl Mar 4, 2026
3900c52
Merge pull request #34 from Nicolinabl/styling-library-quest-list
Nicolinabl Mar 4, 2026
a4e95ac
styled-components import in aboutPage
Nicolinabl Mar 4, 2026
6963864
add quest from library. OBS, frontend, NOT connected to seedlibrary
Nicolinabl Mar 4, 2026
0c7a716
Merge pull request #35 from Nicolinabl/library-functionality
Nicolinabl Mar 4, 2026
a4b2a3e
avatar randomizer added to FE
Mar 4, 2026
7f12076
Merge branch 'main' into mood-avatars
Demijuls Mar 4, 2026
ea44245
Merge pull request #36 from mood-avatars
Demijuls Mar 4, 2026
a99cad8
Merge branch 'main' into check-quest-frontend
Nicolinabl Mar 4, 2026
cec1dca
Merge pull request #37 from Nicolinabl/check-quest-frontend
Nicolinabl Mar 4, 2026
dabcd07
adding divs gone missing in the merge
Nicolinabl Mar 4, 2026
92b6dbc
error handling for auth middleware, updated quest import iin questCon…
Mar 4, 2026
7ae2968
Merge pull request #38 from Nicolinabl/be-routes
Demijuls Mar 4, 2026
79e26f7
import in seedLibraryQuest update
Mar 4, 2026
aec7b85
Merge pull request #39 from Nicolinabl/be-routes
Demijuls Mar 4, 2026
2574a6c
move quest to completed list if checked as complete
Nicolinabl Mar 4, 2026
243e366
Merge pull request #40 from Nicolinabl/completed-quests
Nicolinabl Mar 4, 2026
771dc40
delete quest from completed list
Nicolinabl Mar 4, 2026
860b312
clean up
Mar 4, 2026
d74c170
merge home + profile. Show Home-component if not logged in, profile-c…
Nicolinabl Mar 4, 2026
5f7dd3f
Merge pull request #41 from Nicolinabl/home-profile-state
Nicolinabl Mar 4, 2026
aa8fb57
check quest as done and add to completed list
Nicolinabl Mar 4, 2026
30ca7db
Merge pull request #42 from Nicolinabl/complete-quest-daily
Nicolinabl Mar 4, 2026
d72ecba
added fetching streak to userStore, updated icon stylings
Mar 4, 2026
6eb058f
updated streak route to check for useer id
Mar 4, 2026
af0de7a
Merge pull request #43 from Nicolinabl/fe-components
Demijuls Mar 4, 2026
ef80050
added FE for streak component, renamed streak component
Mar 4, 2026
03ebad4
Merge pull request #44 from fe-components
Demijuls Mar 4, 2026
5f68c48
show friends completed quests on friendfeed
Nicolinabl Mar 4, 2026
b6a3990
Merge pull request #45 from Nicolinabl/friend-feed
Nicolinabl Mar 4, 2026
45790e0
about page logged in and not logged in user
Nicolinabl Mar 4, 2026
450f9a5
Merge pull request #46 from Nicolinabl/about-page
Nicolinabl Mar 4, 2026
204aa2d
updated avatar randomizer, updated stores
Mar 4, 2026
e21989f
Merge branch 'main' into fe-components
Nicolinabl Mar 4, 2026
d473bfb
Merge pull request #47 from Nicolinabl/fe-components
Nicolinabl Mar 4, 2026
d9fa719
bug test
Nicolinabl Mar 4, 2026
88bb2d4
switched to HashRouter
Mar 4, 2026
360d44c
Merge pull request #48 from deployment-fixes
Demijuls Mar 4, 2026
b6e6eea
switched to browserrouter
Mar 4, 2026
2eb3f65
Merge pull request #49 from Nicolinabl/deployment-fixes
Demijuls Mar 4, 2026
5616e01
added checkbox components, icons and styles
Mar 4, 2026
bbd2c80
fixed styling for all quest cards and lists, added anmation
Mar 5, 2026
0d6d32e
Merge pull request #50 from Nicolinabl/css-styling
Nicolinabl Mar 5, 2026
024eb2d
hide show all quest-lists. Css styling profile page
Nicolinabl Mar 5, 2026
b49d65c
styled navbar, header with components, updated global styles
Mar 5, 2026
01f9ca2
styling forms
Nicolinabl Mar 5, 2026
2ee2dd9
Merge pull request #52 from Nicolinabl/hide/show-list
Nicolinabl Mar 5, 2026
491cb60
Merge pull request #53 from Nicolinabl/forms-styling
Nicolinabl Mar 5, 2026
78c0e3a
Merge branch 'main' into css-styling
Nicolinabl Mar 5, 2026
a3f79f7
moved quest list and form, moved user to header
Nicolinabl Mar 5, 2026
ce5970a
styling friend page
Nicolinabl Mar 5, 2026
420be99
Merge pull request #56 from Nicolinabl/friend-styling
Nicolinabl Mar 5, 2026
2f12daf
Merge pull request #54 from css-styling
Demijuls Mar 5, 2026
f365904
Merge pull request #57 from Nicolinabl/profile-rearrange
Nicolinabl Mar 5, 2026
fa44454
styling daily quest + show timeNeeded on completed quest. Dont includ…
Nicolinabl Mar 5, 2026
5848b30
Merge pull request #59 from Nicolinabl/check-quest-fixes
Nicolinabl Mar 5, 2026
955f2dd
redirects file
Nicolinabl Mar 5, 2026
a262fd9
hover, active states buttons. Accessibility fixes
Nicolinabl Mar 5, 2026
4511938
Merge pull request #60 from Nicolinabl/tidy-up-styling
Nicolinabl Mar 5, 2026
737bd91
accessibility get quest, display name instead of email
Nicolinabl Mar 5, 2026
43bea24
added reward component with outside api, updated reward page
Mar 5, 2026
7b4c9df
Merge pull request #61 from Nicolinabl/reward
Demijuls Mar 5, 2026
26ca60c
Merge pull request #62 from Nicolinabl/display-name
Nicolinabl Mar 5, 2026
aff90e2
changed error message for no quests in questlist
Nicolinabl Mar 5, 2026
7f42c09
no quests
Nicolinabl Mar 5, 2026
7952d68
error code change
Nicolinabl Mar 5, 2026
ec7b900
bug
Nicolinabl Mar 5, 2026
44050f0
Merge pull request #63 from Nicolinabl/new-user-bug
Nicolinabl Mar 5, 2026
08bc6ee
reademe, appname
Nicolinabl Mar 5, 2026
12a775e
updating kudos route and fe
Mar 5, 2026
b4653eb
Merge pull request #64 from Nicolinabl/reward
Demijuls Mar 5, 2026
b9ea5c7
fixed kudos on fe and type in response at be
Mar 5, 2026
c104a39
Merge pull request #65 from reward
Demijuls Mar 5, 2026
39184c2
fixed typo in response
Mar 5, 2026
8e9641b
updated kudoscount
Mar 5, 2026
38dd209
updated kudos in schema
Mar 5, 2026
0e4a3f6
Merge pull request #66 from reward
Demijuls Mar 5, 2026
d63639a
style updates
Mar 6, 2026
cf55adc
Merge pull request #67 from Nicolinabl/reward
Demijuls Mar 6, 2026
bbca3c4
friendcontroller be update
Mar 6, 2026
69cbd85
fetching library quests from database, updated sorting user lists
Mar 7, 2026
a91e98d
added react-toast
Mar 7, 2026
35eb0fc
navbar style update
Mar 7, 2026
97150e0
remove todo comments, update readme
Nicolinabl Mar 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#65c89b",
"activityBar.background": "#65c89b",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#945bc4",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#15202b99",
"sash.hoverBorder": "#65c89b",
"statusBar.background": "#42b883",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#359268",
"statusBarItem.remoteBackground": "#42b883",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#42b883",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#42b88399",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "#42b883"
}
50 changes: 43 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
# Final Project
# Randify 👾

Replace this readme with your own information about your project.
Fullstack project built by Nicolinabl & Demijuls

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
Live app: https://julia-nicolina.netlify.app
backend: https://final-project-task-randomizer.onrender.com

## The problem
Your task-list shouldn't feel like a boss battle before you even start. Let us do your mental labour! We'll pick the quest. You just win it.

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
## What is it?

## View it live
Doing tasks is boring. Choosing a task is a task. Too many tasks gets overwhelming —> nothing gets done.
Randify makes your endless task-list fun and easy. Tell the app how much time you have available, and a random task (or as we like to call it: quest) is chosen for you according to how much time you have available. No decision fatigue, no excuses. Complete your quest everyday and keep your avatar happy. Keep a streak and share with your friends.

Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
## Features

🎲 Quest randomizer: enter how many minutes you have, get a quest that fits
📚 Quest library: don't know what to do? Browse our library and add pre-made quests to your personal list
✅ Complete quests: check off quests and keep your avatar happy
😊 Mood avatar: your avatar's mood reflects your streak (sad → happy → super happy)
👯 Friends feed: see what quests others have completed
👏 Kudos: give kudos to friends for finishing their quests
🔥 Streaks: keep completing quests to build your streak

## Tech Stack

### Frontend

- React
- React Router for navigation
- Zustand for global state management
- Styled Components for styling
- Framer Motion for animations
- DiceBear for mood-based avatar generation
- Lottie for animations

## Backend

- Node.js with Express
- MongoDB with Mongoose
- JWT authentication
<!-- Socket.IO for real-time features -->
- bcrypt for password hashing

## Deployment

Frontend hosted on Netlify
Backend hosted on Render
Database hosted on MongoDB Atlas
24 changes: 24 additions & 0 deletions backend/authMiddleware.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { User } from "./schemas.js";

// FIXME - add error handling, put accesstoken req into variable
export const authentificateUser = async (req, res, next) => {
try {
const token = req.header("Authorization");
if (!token) {
return res
.status(401)
.json({ success: false, message: "User is logged out" });
}
const user = await User.findOne({ accessToken: token });
if (user) {
req.user = user;
next();
} else {
res.status(401).json({ loggedOut: true });
}
} catch (err) {
res
.status(500)
.json({ message: "Internal server error", error: err.errors });
}
};
76 changes: 76 additions & 0 deletions backend/controllers/friendController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import mongoose from "mongoose";
import { Quest } from "../schemas.js";
import { User } from "../schemas.js";

import "dotenv/config";

// ---- All friends routes -----

// TODO ---- FRIENDS FEED ----

// FIXME (add friends only to filter) MUST ---- Friends Feed page >>>>> only for auth users( if it's a friends page, otherwise for everybody?)
// What it does:
// - req auth,
// - fetches done quests from other users
// - sorts them by done date (desc)
// - excludes current users quests
// - populates users info
const getFriendsFeed = async (req, res) => {
const { _id: userId } = req.user;

//building query to find all quests made by other users with filter:
const query = Quest.find({
done: true,
doneAt: { $ne: null },
createdBy: { $ne: userId },
})
.sort({ doneAt: -1 })
.limit(20);

try {
//returning all friends quests filtered with query, and populating only fields we need
const friendsQuests = await query
.populate({ path: "createdBy", select: "name moodUrl" })
.select("message category timeNeeded doneAt createdBy kudos");

//console.log(`quests: ${friendsQuests}`);
if (!friendsQuests.length) {
return res.status(200).json({
success: true,
response: [],
message: "Nobody completed quests yet",
});
}
return res.status(200).json(friendsQuests);
} catch (err) {
return res.status(500).json({
success: false,
message: "Server error, couldn't fetch friends quests",
error: err.message,
});
}
};

// FIXME NICE+ ---- Find a friend bi ID page
const findUserById = async (req, res) => {
const friend = await User.findById(req.params.id); //search through users ids in database?
res.json(friend);
};

// TODO NICE+ ---- Find a friend by :name page
const findUserdByName = async (req, res) => {
const friend = await User.findOne(req.params.name); //search through users names in database?
res.json(friend);
};

// FIXME NICE+ ---- Remove a friend >>>>> only for authorised users for their feed
const removeFriend = async (req, res) => {
console.log("delete friend");
};

export default {
getFriendsFeed,
findUserById,
findUserdByName,
removeFriend,
};
Loading