Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
b4929aa
Refactor backend structure: update package.json, implement database c…
KidFromCalifornia Aug 5, 2025
51bcbfa
Enhance backend functionality: add tasting notes routes, improve erro…
KidFromCalifornia Aug 6, 2025
6095e19
Refactor cafe submission and tasting models, enhance routes for submi…
KidFromCalifornia Aug 8, 2025
69b6830
Enhance models and routes: add new fields for cafe and coffee tasting…
KidFromCalifornia Aug 11, 2025
b220de5
Add validation schemas for user registration, login, and coffee tasti…
KidFromCalifornia Aug 11, 2025
00c7ac8
feat: Implement CafeSearchBar component for searching cafes
KidFromCalifornia Aug 12, 2025
7bd0e56
fix: Correct import paths for lazy-loaded components and add HomeTemp…
KidFromCalifornia Aug 12, 2025
a4ec46a
fix: Update import path for HomePage and remove unused HomeTemp page
KidFromCalifornia Aug 12, 2025
a7a347f
fix: Correct HomePage import path and add initial HomePage component
KidFromCalifornia Aug 12, 2025
38cd940
feat: Refactor models and routes for cafes and tastings; update valid…
KidFromCalifornia Aug 13, 2025
9f6045a
feat: Add TastingForm component and integrate with TastingsPage; impl…
KidFromCalifornia Aug 13, 2025
0a655d2
fix: Correct spelling of 'tastingNotes' in TastingsModel; remove unus…
KidFromCalifornia Aug 13, 2025
ce98bd5
fix: Update default limit for cafes to display all seed cafes
KidFromCalifornia Aug 13, 2025
9bf257e
feat: Implement user seeding functionality and refactor cafe seeding;…
KidFromCalifornia Aug 14, 2025
0956cdb
fix: Update cafe descriptions and neighborhoods; adjust API call in T…
KidFromCalifornia Aug 14, 2025
63f3ccb
fix: Enhance user validation and login functionality; allow login wit…
KidFromCalifornia Aug 15, 2025
7b2996e
feat: Enhance authentication and user experience; allow login with ca…
KidFromCalifornia Aug 15, 2025
e970085
fix: Update user ID handling in tasting notes; change from _id to id …
KidFromCalifornia Aug 15, 2025
57ffd2c
feat: Implement cafe submission form and validation; add new features…
KidFromCalifornia Aug 18, 2025
37d0d3d
fix: Add mongodb dependency to both backend and parent package.json f…
KidFromCalifornia Aug 18, 2025
81c6a05
feat: Add redirect configuration to serve index.html for root path
KidFromCalifornia Aug 18, 2025
267fe6f
fixe file structure
KidFromCalifornia Aug 18, 2025
ce47091
Admin page link in nav apears when admin is logged. admin page displ…
KidFromCalifornia Aug 18, 2025
9ded6cd
Add JWT decoding utility and Leaflet CSS styles
KidFromCalifornia Aug 18, 2025
0ba08d4
Refactor code structure for improved readability and maintainability
KidFromCalifornia Aug 18, 2025
2be0148
feat: Add node-fetch dependency and implement geocoding cache in seed…
KidFromCalifornia Aug 18, 2025
4935068
Refactor geocoding to use OpenCage API, update caching mechanism, and…
KidFromCalifornia Aug 19, 2025
7c14312
Refactor code structure for improved readability and maintainability
KidFromCalifornia Aug 19, 2025
17c65d7
feat: Seed initial data for users and tasting notes; add reusable UI …
KidFromCalifornia Aug 19, 2025
9496c5a
Refactor code structure for improved readability and maintainability
KidFromCalifornia Aug 19, 2025
c97e7da
fix: Ensure jwt-decode dependency is included in package.json
KidFromCalifornia Aug 19, 2025
413f597
Add global styles, button components, theme configuration, and Jest s…
KidFromCalifornia Aug 20, 2025
4bfcdea
refactor: Update button styles and improve theme configuration for co…
KidFromCalifornia Aug 20, 2025
f929dd1
Implement code changes to enhance functionality and improve performance
KidFromCalifornia Aug 21, 2025
d220866
feat: update VSCode settings, backend MongoDB URI, and remove unused …
KidFromCalifornia Aug 21, 2025
8c2bf71
Add LoadingLogo component with animated logo and shield
KidFromCalifornia Aug 21, 2025
5d120eb
Refactor code structure for improved readability and maintainability
KidFromCalifornia Aug 21, 2025
7823860
chore: add styled-components dependency for improved styling capabili…
KidFromCalifornia Aug 21, 2025
a044727
Refactor code structure for improved readability and maintainability
KidFromCalifornia Aug 21, 2025
03e63c7
Implement feature X to enhance user experience and fix bug Y in module Z
KidFromCalifornia Aug 22, 2025
2a20fe2
Add SVG map pin icon, create CardStyledWrapper component, and define …
KidFromCalifornia Aug 23, 2025
04abc3d
Add FilterDropdown component for filtering options in UI
KidFromCalifornia Aug 25, 2025
a5966f8
Refactor map components and icons; remove unused files
KidFromCalifornia Aug 25, 2025
9118290
Remove unused components and files; implement dark mode theme support…
KidFromCalifornia Aug 25, 2025
3b1397a
Add MobileBottomNav component and update layout for responsive design…
KidFromCalifornia Aug 25, 2025
3cf82ed
feat: add GeotagFab component and custom map icons
KidFromCalifornia Aug 26, 2025
633def7
Refactor code structure for improved readability and maintainability
KidFromCalifornia Aug 27, 2025
cc5269a
feat: add MapLibreMap component for interactive map display with café…
KidFromCalifornia Aug 27, 2025
50d4815
feat: implement health check endpoint, enhance CafeSearchBar with MUI…
KidFromCalifornia Aug 28, 2025
b92660d
feat: update dependencies, enhance theme customization, and improve c…
KidFromCalifornia Aug 28, 2025
7ad24c3
Refactor code structure for improved readability and maintainability.…
KidFromCalifornia Aug 28, 2025
91cc813
feat: replace cafe type and neighborhood filters with FilterDropdown …
KidFromCalifornia Aug 28, 2025
6c7d3d3
feat: refactor filter management to use global store, enhance filteri…
KidFromCalifornia Aug 28, 2025
c098cb2
feat: Implement NavBar component with responsive design and dark mode…
KidFromCalifornia Aug 28, 2025
6333416
feat: Enhance MapLibreMap to support multiple cafe locations and impr…
KidFromCalifornia Aug 28, 2025
e3cc898
Enhance UI with Tooltips and Theme Adjustments
KidFromCalifornia Aug 29, 2025
ad22419
feat: Enhance UI components with improved styling, layout adjustments…
KidFromCalifornia Aug 30, 2025
68c7b55
Refactor code style across multiple files to use single quotes for st…
KidFromCalifornia Aug 31, 2025
fd7a660
tatsing paged styles need to fix miss aligned boxes edit / delete logic
KidFromCalifornia Aug 31, 2025
fbaacb3
reset file and ran bulid
KidFromCalifornia Sep 1, 2025
307a409
chore: Update geocode cache coordinates, bump mongodb version, and en…
KidFromCalifornia Sep 1, 2025
7573995
fix: Remove extra space in OPENCAGE_API_KEY sync comment for consistency
KidFromCalifornia Sep 1, 2025
65ccc19
chore: Remove frontend static site configuration from render.yaml for…
KidFromCalifornia Sep 1, 2025
e47a0ff
chore: Clean up package.json dependencies and update production API URL
KidFromCalifornia Sep 1, 2025
cfef928
Trigger clean deploy after dependency cleanup
KidFromCalifornia Sep 1, 2025
41222ba
new run build
KidFromCalifornia Sep 1, 2025
9e21262
run build gain to check API
KidFromCalifornia Sep 1, 2025
46378d5
Fix SPA routing with _redirects file
KidFromCalifornia Sep 1, 2025
a63f8b4
feat: add Zustand state management library to frontend assets
KidFromCalifornia Sep 1, 2025
c61a1b5
Remove conflicting styling dependencies to fix AsyncMode issues
KidFromCalifornia Sep 1, 2025
68809ee
Fix .gitignore to track package-lock.json for consistent builds
KidFromCalifornia Sep 1, 2025
6b8fc36
Add .nvmrc to ensure consistent Node version on Netlify
KidFromCalifornia Sep 1, 2025
f83a71a
tryign to locate async error
KidFromCalifornia Sep 1, 2025
3298562
reset depenacies
KidFromCalifornia Sep 1, 2025
c0e20eb
Fix Rollup dependencies - build working locally
KidFromCalifornia Sep 1, 2025
0560a61
Add netlify.toml configuration file
KidFromCalifornia Sep 1, 2025
560060e
Fix Netlify build: move Rollup to dependencies, fix Node.js version, …
KidFromCalifornia Sep 1, 2025
5b4c627
Force Node.js 20.18.0 and improve build configuration for Netlify
KidFromCalifornia Sep 1, 2025
8ac9a6c
Update Material-UI to v6 to fix ForwardRef error in production
KidFromCalifornia Sep 1, 2025
dfed20d
Fix .gitignore to exclude node_modules and dist directories
KidFromCalifornia Sep 1, 2025
1e48498
testing
KidFromCalifornia Sep 1, 2025
96b2136
Fix fetch calls: Add proper error handling and async/await patterns
KidFromCalifornia Sep 1, 2025
ddf4f9d
testing
KidFromCalifornia Sep 1, 2025
bb256e4
Simplify: Remove --force from Netlify build
KidFromCalifornia Sep 1, 2025
7745637
Clean backend dependencies: Remove Babel, Zod, unnecessary
KidFromCalifornia Sep 1, 2025
8890382
Improve .gitignore: Better node_modules protection
KidFromCalifornia Sep 1, 2025
ec49174
Fix Render deployment: Replace validation
KidFromCalifornia Sep 1, 2025
5a4646c
Complete Zod removal: Clean validation.js and fix cafeSubmissions
KidFromCalifornia Sep 2, 2025
2cdfb1f
Fix server error
KidFromCalifornia Sep 2, 2025
69cac70
fixing importing for backen d
KidFromCalifornia Sep 2, 2025
c783e47
Fix critical backend errors: Add missing imports and variables
KidFromCalifornia Sep 2, 2025
f38cfc7
Fix health check endpoint: Move /healthz before server startup for Re…
KidFromCalifornia Sep 2, 2025
f979baa
Revise README with updated links and remove setup section
KidFromCalifornia Sep 2, 2025
d94423c
removing toml
KidFromCalifornia Sep 2, 2025
0c99014
removed change made to vit config
KidFromCalifornia Sep 2, 2025
92f2cb1
down graded node to 18.
KidFromCalifornia Sep 2, 2025
18ace41
- Added ESLint rules for accessibility checks using jsx-a11y plugin.
KidFromCalifornia Sep 2, 2025
3f2a6b6
Add About Me page with project details
KidFromCalifornia Sep 2, 2025
fa62bfd
add styling about page and imporved funcational in navbar moible
KidFromCalifornia Sep 4, 2025
b40e1bd
refactor: simplify fetching tastings by removing unnecessary .data ac…
KidFromCalifornia Sep 4, 2025
96f1a7d
Refactor alert handling and improve performance with lazy loading
KidFromCalifornia Sep 4, 2025
ef9c81b
debugg tasting page and flip card to redisplay tasting notes
KidFromCalifornia Sep 4, 2025
772fdeb
fixed mui style error. downgraded to react 18.2 stable
KidFromCalifornia Sep 5, 2025
abc59d5
fixed map ara label error in AXE console
KidFromCalifornia Sep 5, 2025
3e63db2
feat: Enhance UserPage with improved cafe and tasting management feat…
KidFromCalifornia Sep 6, 2025
c0fd617
update file after debuing a a11y checks
KidFromCalifornia Sep 6, 2025
25c9360
Enhance accessibility and UI improvements across components
KidFromCalifornia Sep 7, 2025
f8145c5
fix: Add aria-label for toggle button in TastingForm for improved acc…
KidFromCalifornia Sep 7, 2025
1e2780a
- Added SVG logo for the Stockholm Coffee Club.
KidFromCalifornia Sep 7, 2025
ae4780f
Refactor TastingForm component styles and structure; remove unused st…
KidFromCalifornia Sep 7, 2025
49756fd
fix: Update meta tag for mobile web app compatibility and refactor Lo…
KidFromCalifornia Sep 7, 2025
d8d3b8f
fix: Correct import paths for logo assets in LoadingLogo component
KidFromCalifornia Sep 7, 2025
8dc6c6f
Refactor code structure for improved readability and maintainability
KidFromCalifornia Sep 7, 2025
f9e3227
login finish and A11y
KidFromCalifornia Sep 9, 2025
3a1a500
Refactor components for improved accessibility and styling; enhance s…
KidFromCalifornia Oct 17, 2025
a8ed93b
Refactor UI components for improved theming and consistency
KidFromCalifornia Oct 20, 2025
518a88f
Remove node_modules from git tracking
KidFromCalifornia Oct 21, 2025
af4dc5e
chore: remove ignored files from Git tracking and update .gitignore
KidFromCalifornia Oct 21, 2025
fd9ed30
chore: remove backend scripts from Git tracking and update .gitignore
KidFromCalifornia Oct 21, 2025
58c242f
chore: update package.json scripts for correct path, remove unused fi…
KidFromCalifornia Oct 21, 2025
2fca9ba
chore: restore deployment-critical scripts to backend
KidFromCalifornia Oct 21, 2025
e229c1b
chore: added back nessary seed scripts remove unnecessary seedUsers.j…
KidFromCalifornia Oct 21, 2025
da69dd1
chore: remove unnecessary seedTasting.js from backend
KidFromCalifornia Oct 21, 2025
b46b88b
chore: remove backend scripts directory from .gitignore
KidFromCalifornia Oct 21, 2025
a1ce4b0
style: update color and font weight for search input in CafeSearchBar…
KidFromCalifornia Oct 21, 2025
e3f028c
style: enhance UserPage component with improved tab styling and butto…
KidFromCalifornia Oct 21, 2025
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
44 changes: 39 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,49 @@
node_modules
.DS_Store
# Dependencies
node_modules/
/frontend/node_modules/
/backend/node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnp
.pnp.js

# Testing
coverage
.nyc_output

# Build
dist
build
.next
out
.unlighthouse
.vscode
scripts/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

build

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

package-lock.json
# System files
.DS_Store
Thumbs.db

# IDE
.idea
.vscode
*.swp
*.swo

# Temp files
*.log
*.cache
.unlighthouse
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18.0
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18.0
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"arrowParens": "always"
}
111 changes: 104 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,110 @@
# Final Project
# Stockholm Coffee Club

Replace this readme with your own information about your project.
Welcome to Stockholm Coffee Club — a fullstack app that helps you discover the city’s best specialty coffee spots. Whether you’re a local on the hunt for your next flat white or a visitor exploring Stockholm’s café culture, this app’s got you covered.

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
Built with **React, Node.js, and MongoDB**, it features interactive maps, user accounts, and a way to log your own coffee tasting notes.

## The problem
---

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?
## Why this app?

## View it live
Stockholm has an established coffee culture, but finding the really good spots isn’t always easy. This app brings them all together in one place with:

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.
- An interactive map of coffee shops (with filters so you can find what matters to you)
- A tasting notes system so you (and others) can review your coffee adventures
- User accounts, profiles, and admin features for managing content
- A mobile-first design so you can use it on the go

---

## Tech stack

### Frontend

- **React 18** with lazy loading + Suspense
- **Material-UI v5** for styling and theming
- **Zustand** for state management
- **MapLibre GL JS** for the interactive map
- **React Router** for navigation
- **SweetAlert2** for nicer alerts

### Backend

- **Node.js + Express**
- **MongoDB + Mongoose**
- **JWT authentication** (with bcryptjs)
- **Role-based access control** (admin & user)
- **REST API** with solid error handling

---

## Main features

- Interactive map with geolocation
- Coffee tasting notes & ratings
- User authentication + profiles
- Filters & search to find the right café
- Light/dark theme toggle
- Mobile-friendly design
- Admin panel for managing cafés and submissions

---

## API Endpoints (quick peek)

**Auth**

- `POST /api/auth/register` → Create a new account
- `POST /api/auth/login` → Log in

**Cafés**

- `GET /api/cafes` → Get all approved cafés
- `GET /api/cafes/:id` → Get one café
- `POST /api/cafes` → Add new café (admin only)

**Tastings**

- `GET /api/tastings/public` → Browse public notes
- `GET /api/tastings` → Your tasting notes (login required)
- `POST /api/tastings` → Add a tasting note (login required)

**Submissions**

- `POST /api/cafeSubmissions` → Suggest a café
- `GET /api/cafeSubmissions` → View submissions (admin only)

---

## How I built it

I started with the core journey: discovering cafés on a map. From there, I layered on features like tastings, profiles, and admin tools. A few key decisions:

1. **State management**: Used Zustand (lighter than Context, simpler than Redux)
2. **UI/UX**: Material-UI made styling fast and consistent
3. **Maps**: Went with MapLibre (open-source, no vendor lock-in)
4. **Auth**: JWT-based with role handling
5. **Database**: MongoDB for flexible café + review data

---

## What’s next?

Some things I’d love to add down the line:

- Real-time notifications when new cafés get approved
- Push notifications for nearby recommendations
- A storefront for beans & gear
- A fun coffee-brewing mini-game
-

---

## Live links

- **Frontend**: [stockholmscoffeeclub.netlify.app]
(https://stockholmscoffeeclub.netlify.app/)
- **Backend**: [stockholmscoffeeclub.onrender.com/api]
(https://stockholmscoffeeclub.onrender.com/api)
- **GitHub**: [project-final-JH]
(https://github.com/KidFromCalifornia/project-final-JH)
20 changes: 20 additions & 0 deletions axe-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
rules:
heading-order: false # Disable this rule
color-contrast: true # Check for sufficient color contrast
html-has-lang: true # Ensure HTML has a lang attribute
image-alt: true # Check that images have alt text
landmark-one-main: true # Ensure there's one main landmark
page-has-heading-one: true # Check that pages have an h1

exclude:
- 'tests/**/*.html' # Skip test files
- 'build/**/*.html' # Skip build output
- 'dist/**/*.html' # Skip distribution files

global-components:
AxeButton: button # Lint <AxeButton> as though it was a <button>
MuiTextField: input # Lint Material-UI text fields as inputs

global-libraries:
- 'react-native' # Run React Native rules
- '@mui/material' # Enable linting MaterialUI components
5 changes: 0 additions & 5 deletions backend/.babelrc

This file was deleted.

Loading