Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
a14913d
Add initial Express and HTTP server implementations
Code-lab-web May 26, 2025
5a87cee
Add unit tests for greet function
Code-lab-web May 26, 2025
567f00f
Add initial test file for multiplication functionality
Code-lab-web May 26, 2025
a52f9af
Add tests for multiplication function and implement firstLast utility
Code-lab-web May 26, 2025
ce09589
Add express-list-endpoints import to server.js
Code-lab-web May 28, 2025
240d036
Update root route response to include welcome message and list endpoints
Code-lab-web May 28, 2025
cfd944b
Update .gitignore and package.json to include dotenv and mongodb depe…
Code-lab-web May 28, 2025
dd91885
git commit -m "Code-lab-web"
Code-lab-web May 28, 2025
611b809
Add utility functions for string manipulation and update related tests
Code-lab-web May 28, 2025
fe92028
Merge branch 'master' of https://github.com/Code-lab-web/express-api-…
Code-lab-web May 28, 2025
23a8569
Merge branch 'master' of https://github.com/Code-lab-web/express-api-…
Code-lab-web May 28, 2025
6566d8b
Add initial data.json file
Code-lab-web May 28, 2025
882ba7a
Fix import statements and add data endpoint to serve JSON data
Code-lab-web May 28, 2025
8d06175
Add endpoint to retrieve data by ID and log request parameters
Code-lab-web May 28, 2025
128c4a8
git "Code-lab-web"
Code-lab-web May 30, 2025
863c839
git commit -m "Code-lab-web"
Code-lab-web May 29, 2025
9219214
git commit -m "Code-lab-web"
Code-lab-web May 30, 2025
bb1a784
Add express-list-endpoints integration and update endpoint response s…
Code-lab-web May 30, 2025
7c84814
Fix import statement formatting in multiplication test
Code-lab-web May 30, 2025
27063a2
git commit -m "Code-lab-web"
Code-lab-web May 30, 2025
8a3b3d1
git commit -m "Code-lab-web"
Code-lab-web May 30, 2025
f11dc62
git commit -m "Code-lab-web"
Code-lab-web May 30, 2025
0b6d430
Add express-list-endpoints functionality with TypeScript definitions
Code-lab-web May 30, 2025
20fe2f9
git commit -m "Code-lab-web"
Code-lab-web May 30, 2025
a60837c
git commit -m "Code-lab-web"
May 29, 2025
73dc0ed
Code-lab-web
May 29, 2025
348bf40
git commit -m "Code-lab-web"
May 30, 2025
68c6bbd
git commit -m "Code-lab"
May 30, 2025
2855c06
Merge remote-tracking branch 'origin/HEAD'
May 31, 2025
f63f125
Refactor babel-node and nodemon binaries to use symlinks
Code-lab-web Jun 3, 2025
9499b77
Fix route handling and improve endpoint responses in server.js
Code-lab-web Jun 3, 2025
3523b2b
git commit -m "Code-lab-web"
Code-lab-web Jun 3, 2025
d753ea6
Add redirects for various paths in _redirects.md
Code-lab-web Jun 3, 2025
a85f955
Add PBS scripts and cleanup utility for MongoDB stress testing
Code-lab-web Jun 3, 2025
f1d9d96
Implement thoughts API with database seeding and error handling
Code-lab-web Jun 3, 2025
b8aaa4d
Implement feature enhancements and optimize performance across the ap…
Code-lab-web Jun 4, 2025
e2f7340
Fix typo in Thought model definition in server.js
Code-lab-web Jun 4, 2025
4b9a476
Fix mongoose model definition and add PATCH endpoint for updating tho…
Code-lab-web Jun 4, 2025
62c23c8
git commit -m "Code-lab-web"
Code-lab-web Jun 4, 2025
32ecaaf
Add client-server authentication implementation with socket programming
Code-lab-web Jun 4, 2025
6042061
Add Person model definition with validation for name and height
Code-lab-web Jun 4, 2025
ce5161b
Fix formatting issues in server.js and add body-parser middleware for…
Code-lab-web Jun 4, 2025
b529b46
Update .gitignore, add new dependencies in package.json, and implemen…
Code-lab-web Jun 4, 2025
45b53db
Refactor server.js for improved error handling and code consistency; …
Code-lab-web Jun 4, 2025
0adb937
Add Task model with validation and connect to MongoDB in server.js
Code-lab-web Jun 4, 2025
da96440
Add endpoint to retrieve all tasks, sorted by creation date
Code-lab-web Jun 4, 2025
6b45b0b
Refactor POST endpoint for creating a person to use async/await and i…
Code-lab-web Jun 5, 2025
65c022f
Add POST endpoint for creating tasks with error handling
Code-lab-web Jun 5, 2025
43d9059
Migrate application to React; implement fetching and posting of thoughts
Code-lab-web Jun 5, 2025
f3826c4
Add React and dom packages to dependencies; update package-lock.json
Code-lab-web Jun 5, 2025
152259c
Add Header component with buttons for removing all thoughts and reset…
Code-lab-web Jun 5, 2025
86eeb34
Add Thought component with message display, like, and delete buttons
Code-lab-web Jun 5, 2025
511035d
Add ThoughtForm component for submitting new thoughts
Code-lab-web Jun 5, 2025
b48fcc5
Add ThoughtList component to display a list of thoughts
Code-lab-web Jun 5, 2025
ddc9399
Add App.css for styling components with light and dark themes
Code-lab-web Jun 5, 2025
e0d2329
Refactor App component to integrate Header, ThoughtForm, and ThoughtL…
Code-lab-web Jun 5, 2025
5228ef4
Add main.jsx to define App component structure with Header, ThoughtFo…
Code-lab-web Jun 5, 2025
c6024ad
Add Vite as a development dependency for improved build performance
Code-lab-web Jun 5, 2025
effbc7c
Update Babel dependency to version 6.23.0 and adjust babel-node path
Code-lab-web Jun 5, 2025
1c30e5d
Update README.md to include React and Vite setup instructions and ESL…
Code-lab-web Jun 5, 2025
e121f9c
Add ESLint configuration for JavaScript and React with recommended rules
Code-lab-web Jun 5, 2025
b06419f
Add index.html file with basic structure for the application
Code-lab-web Jun 5, 2025
687460f
Add Vite configuration file for React application setup
Code-lab-web Jun 5, 2025
bceadd9
Add Zustand store for managing thoughts with createThought functionality
Code-lab-web Jun 5, 2025
2699c76
Add Zustand as a dependency and update package-lock.json
Code-lab-web Jun 5, 2025
8de864e
Update index.html to improve structure and include stylesheets
Code-lab-web Jun 5, 2025
bcd89f1
Add form.css for card styling and animations
Code-lab-web Jun 5, 2025
327ce91
Add Card component with props for title, description, icon, and selec…
Code-lab-web Jun 5, 2025
808919c
Add Card.css for styling and animations of Card component
Code-lab-web Jun 5, 2025
b7805cc
Add form.jsx for card component styling and animations
Code-lab-web Jun 5, 2025
d0c62cb
Refactor form.jsx to import styles from form.css
Code-lab-web Jun 5, 2025
ece42af
Add animation component with basic structure and CSS import
Code-lab-web Jun 5, 2025
c20c320
Add global styles and animations in animation.css
Code-lab-web Jun 5, 2025
5732b0e
git commit -m "Code-lab-web"
Code-lab-web Jun 5, 2025
8fba23f
Add devDependencies for ESLint and TypeScript
Code-lab-web Jun 5, 2025
9b5555b
Add ESLint configuration with TypeScript support
Code-lab-web Jun 5, 2025
7e53ad8
Add atlas package as a dependency and update package-lock.json
Code-lab-web Jun 5, 2025
3a2b2bf
Update Babel dependencies and fix minor issues in helper functions
Code-lab-web Jun 5, 2025
7a1459a
Fix formatting in server.js and add color filter to query
Code-lab-web Jun 5, 2025
25d60e5
Fix indentation in server.js for better readability
Code-lab-web Jun 5, 2025
d2f7dd3
Add render and traverser packages to dependencies in package.json and…
Code-lab-web Jun 5, 2025
f0a0ee5
Add crypto dependency and implement User model with access token gene…
Code-lab-web Jun 9, 2025
38b2fa9
Add python package to dependencies in package.json and package-lock.json
Code-lab-web Jun 9, 2025
47f4a5f
Implement one-way encryption for user passwords and save a sample use…
Code-lab-web Jun 9, 2025
d27521a
Add example for user password encryption and comparison in server.js
Code-lab-web Jun 9, 2025
b5d7318
Add session handling for user authentication with password verification
Code-lab-web Jun 9, 2025
04edbd7
Add authentication middleware to verify user access token
Code-lab-web Jun 9, 2025
13f7bce
Fix syntax errors and improve MongoDB connection handling in server.js
Code-lab-web Jun 9, 2025
c438ded
Add bcrypt and bcrypt-nodejs dependencies to enhance password handling
Code-lab-web Jun 9, 2025
afead65
Add comment to ensure MONGO_URL environment variable is set before ru…
Code-lab-web Jun 9, 2025
1715fcf
Add Netlify configuration for frontend build and redirects
Code-lab-web Jun 9, 2025
eaac9a7
Add project metadata and postinstall script to package.json
Code-lab-web Jun 9, 2025
3c1c5c8
Remove placeholder project name and postinstall script from package.json
Code-lab-web Jun 9, 2025
9ebcd2a
Add blank line for improved readability in launch.json
Code-lab-web Jun 9, 2025
b443e18
Refactor MongoDB connection handling and fix missing closing braces i…
Code-lab-web Jun 10, 2025
66bacf9
Fix formatting in server.js for consistent MongoDB URL declaration
Code-lab-web Jun 10, 2025
86ab06d
Fix indentation and remove unnecessary lines in server.js for improve…
Code-lab-web Jun 10, 2025
71bd8f4
Implement DELETE endpoint for thoughts and handle error responses
Code-lab-web Jun 11, 2025
ea13599
git commit -m "Code-lab-web"
Code-lab-web Jun 11, 2025
32447ae
Add thought schema definition and fix syntax errors in server.js
Code-lab-web Jun 11, 2025
79b7c87
Fix PATCH endpoint for thoughts to handle errors and return appropria…
Code-lab-web Jun 11, 2025
375012f
Fix PATCH endpoint to correctly update thought name and handle errors
Code-lab-web Jun 11, 2025
e39d6bd
Refactor thought schema definition and improve error handling in DELE…
Code-lab-web Jun 11, 2025
c532738
Update subproject commit to indicate dirty state
Code-lab-web Jun 11, 2025
eccd14c
nnpmnpmRefactor app.js to include routing for index and auth, and upd…
Code-lab-web Jun 12, 2025
d690bec
git commit -m "Code-lab-web"
Code-lab-web Jun 12, 2025
e166432
Add React components and error handling for character limit in input
Code-lab-web Jun 12, 2025
f9f5c81
Add initial CSS styles for the application layout and input error han…
Code-lab-web Jun 12, 2025
c18a3ba
Add state management and fetch data in App component with scroll even…
Code-lab-web Jun 12, 2025
dec546e
Add form component with state management and styling for user input
Code-lab-web Jun 12, 2025
187f1cb
Add authentication middleware for user validation
Code-lab-web Jun 13, 2025
397cc7f
Add user model with email, password, and access token fields
Code-lab-web Jun 13, 2025
a716c76
Add Thought model with schema for id, name, and color fields
Code-lab-web Jun 13, 2025
75d91bf
Add symbolism and lastThoughtTimestamp fields to Thought model; imple…
Code-lab-web Jun 13, 2025
aa471d5
Refactor import paths for User and Thought models; add user registrat…
Code-lab-web Jun 13, 2025
11cbd79
git commit -m "Code-lab-web"
Code-lab-web Jun 13, 2025
a08f54a
Add SignupForm component for user registration with email and passwor…
Code-lab-web Jun 13, 2025
7bd2d83
Add LoginForm component for user authentication with email and passwo…
Code-lab-web Jun 13, 2025
0449062
Add ColorFilter component for filtering items by color
Code-lab-web Jun 13, 2025
af35266
Add EditButton component for editing thoughts with prompt confirmation
Code-lab-web Jun 13, 2025
481cc87
Merge branch 'master' of https://github.com/Code-lab-web/express-api-…
Code-lab-web Jun 13, 2025
e387c0c
Merge branch 'master' of https://github.com/Code-lab-web/express-api-…
Code-lab-web Jun 13, 2025
8136901
Add ThoughtsGrid component for displaying thoughts with color filtering
Code-lab-web Jun 13, 2025
35f7a1e
Refactor App component to remove duplicate declaration and update Tho…
Code-lab-web Jun 13, 2025
60bfbaa
Add LoadingSpinner component for displaying loading state while fetch…
Code-lab-web Jun 13, 2025
fcf0ca7
git commit -m "Code-lab-web"
Code-lab-web Jun 13, 2025
c49b7aa
Refactor import statements in main.jsx for improved organization and …
Code-lab-web Jun 13, 2025
ee19e64
Refactor main.jsx to use StrictMode and createRoot for improved rende…
Code-lab-web Jun 13, 2025
78cbbc0
Add additional imports in App.jsx for improved functionality and comp…
Code-lab-web Jun 13, 2025
66923a0
Add additional imports in main.jsx for enhanced functionality and com…
Code-lab-web Jun 13, 2025
7eaa2be
Refactor App.jsx and main.jsx to improve import organization and enha…
Code-lab-web Jun 13, 2025
cbccee4
Add Animation component import in App.jsx and main.jsx for enhanced f…
Code-lab-web Jun 13, 2025
6b210f3
git commit -m "Code-lab-web"
Code-lab-web Jun 13, 2025
7e046f7
git commit -m "Code-lab-web"
Jun 13, 2025
f3bdc86
Add user and thought routes imports in server.js for improved routing…
Code-lab-web Jun 14, 2025
0add39d
Update VSCode settings to configure Python environment management
Code-lab-web Jun 14, 2025
cc5d743
Add symlink files for various CLI tools in node_modules/.bin
Code-lab-web Jun 14, 2025
f224d0f
Add loader element selection in index.js for preloader functionality
Code-lab-web Jun 16, 2025
d852029
git commit -m "Code-lab-web"
Code-lab-web Jun 16, 2025
0ae9dbd
Refactor components: migrate LoadingSpinner, ThoughtForm, Card, Color…
Code-lab-web Jun 16, 2025
8cbc0dc
git commit -m "Code-lab-web"
Code-lab-web Jun 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
36 changes: 36 additions & 0 deletions ## GitHub Copilot Chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## GitHub Copilot Chat

- Extension Version: 0.23.2 (prod)
- VS Code: vscode/1.96.4
- OS: Linux

## Network

User Settings:
```json
"github.copilot.advanced.debug.useElectronFetcher": true,
"github.copilot.advanced.debug.useNodeFetcher": false,
"github.copilot.advanced.debug.useNodeFetchFetcher": true
```

Connecting to https://api.github.com:
- DNS ipv4 Lookup: timed out after 10 seconds
- DNS ipv6 Lookup: Error (8 ms): getaddrinfo ENOTFOUND api.github.com
- Proxy URL: None (2 ms)
- Electron fetch (configured): timed out after 10 seconds
- Node.js https: timed out after 10 seconds
- Node.js fetch: timed out after 10 seconds
- Helix fetch: timed out after 10 seconds

Connecting to https://api.individual.githubcopilot.com/_ping:
- DNS ipv4 Lookup: timed out after 10 seconds
- DNS ipv6 Lookup: timed out after 10 seconds
- Proxy URL: None (16 ms)
- Electron fetch (configured): timed out after 10 seconds
- Node.js https: timed out after 10 seconds
- Node.js fetch: timed out after 10 seconds
- Helix fetch: timed out after 10 seconds

## Documentation

In corporate networks: [Troubleshooting firewall settings for GitHub Copilot](https://docs.github.com/en/copilot/troubleshooting-github-copilot/troubleshooting-firewall-settings-for-github-copilot).
23 changes: 23 additions & 0 deletions .codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"command": "pnpm install",
"name": "Installing Dependencies"
}
],

// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"start": {
"name": "start",
"command": "pnpm start",
"runAtStart": false
},
"dev": {
"name": "dev",
"command": "pnpm dev",
"runAtStart": true
}
}
}
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_="my secret api key from.env"
DATABASE_SE="super secret"
8 changes: 0 additions & 8 deletions .gitignore

This file was deleted.

55 changes: 55 additions & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# To learn more about how to use Nix to configure your environment
# see: https://firebase.google.com/docs/studio/customize-workspace
{ ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
# pkgs.go
# pkgs.python311
# pkgs.python311Packages.pip
# pkgs.nodejs_20
# pkgs.nodePackages.nodemon
];

# Sets environment variables in the workspace
env = {};
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
# "vscodevim.vim"
];

# Enable previews
previews = {
enable = true;
previews = {
# web = {
# # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
# # and show it in IDX's web preview panel
# command = ["npm" "run" "dev"];
# manager = "web";
# env = {
# # Environment variables to set for your server
# PORT = "$PORT";
# };
# };
};
};

# Workspace lifecycle hooks
workspace = {
# Runs when a workspace is first created
onCreate = {
# Example: install JS dependencies from NPM
# npm-install = "npm install";
};
# Runs when the workspace is (re)started
onStart = {
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
};
};
};
}
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"runtimeExecutable": "npm",
"runtimeArgs": [
"start"
],
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "neverOpen"
},
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"IDX.aI.enableInlineCompletion": true,
"IDX.aI.enableCodebaseIndexing": true,
"python-envs.defaultEnvManager": "ms-python.python:system",
"python-envs.pythonProjects": []
}
7 changes: 7 additions & 0 deletions 1-multiplication.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { multiply } from './1-multiplication';

describe('multiplication', () => {
it('should multiply two numbers correctly', () => {
expect(multiply(2, 3)).toBe(6);
});
});
4 changes: 4 additions & 0 deletions 2-first-last.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const firstLast = (items) => {
return 'First: ${items[0]}, Last: ${items[items[1]}'

}
91 changes: 91 additions & 0 deletions App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#root {
margin: 0 auto;
}
}
.App {
font-family: sans-serif;
text-align: center;
}
.input-container {
position: relative;
}
input {
border: 1px solid #e4e4e7;
padding: 0.5rem 0.5rem;
width: 320 - 1600px;
}
.error {
position: absolute;
top: 1.5rem;
left: 0;
color: red;
}

body {
margin: 0;
font-family: "Montserrat";
}

h1, section, header {
padding: 2rem;
}

.light {
background: aquamarine;
color: rgb(0, 24, 164);
}

.dark {
background: rgb(0, 24, 164);
color: aquamarine;
}

button {
padding: 18px;
border-radius: 30px;
border: 0;
background: hotpink;
color: white;
font-size: 16px;
font-weight: bold;
font-family: "Montserrat";
margin-right: 0.5rem;
}

select {
border: none;
border-radius: 4px;
color: rgb(0, 24, 164);
font-size: 16px;
font-weight: 600;
height: 40px;
font-family: 'Montserrat';
padding: 0 20px;
cursor: pointer;

-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}

main {
padding: 2rem;
}

.thought {
border: 2px solid blue;
padding: 1rem;
margin-bottom: 1rem;
}

form {
display: flex;
flex-direction: column;
width: 200px;
padding-bottom: 2rem;
}

textarea {
height: 100px;
margin-bottom: 1rem;
}
81 changes: 81 additions & 0 deletions App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { useState } from "react"
import { useEffect } from "react"
import { StrictMode } from 'react'

import { Container, Typography } from "@mui/material";

import { createRoot } from 'react-dom/client'
import { Header } from "./Header"
import { ThoughtForm } from "./ThoughtForm"
import { ThoughtList } from "./ThoughtList"
import { ColorFilter } from "./ColorFilter"
import { ThoughtGrid } from "./ThoughtGrid"
import { LoadingSpinner } from "./LoadingSpinner";
import { LoginForm } from "./LoginForm";
import { SignupForm } from "./SignupForm";
import { EditButton } from "./EditButton"
import { Form } from "./Form";
import { Card } from "./Card";
import { Index } from "./Index";
import { Css } from "./Css";
import { Animation } from "./Animation";


// Removed duplicate declaration of App component
export const App = () => {
const [count, setCount] = useState(0);

useEffect(() => {
const handleScroll = () => {
console.log('scrolled!');
};

window.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
};
}, []);

useEffect(() => {
const controller = new AbortController();

fetch('https://happy-thoughts-ux7hkzgmwa-uc.a.run.app/thoughts', { signal: controller.signal })
.then(response => response.json())
.then(data => console.log(data));

const intervalId = setInterval(() => {
fetch('https://happy-thoughts-ux7hkzgmwa-uc.a.run.app/thoughts', { signal: controller.signal })
.then(response => response.json())
.then(data => console.log(data));

console.log('This runs every second');
}, 1000);

return () => {
clearInterval(intervalId);
controller.abort();
};
}, []);
return (
<div>
<button onClick={() => setCount(count + 1)}>
Increase count
</button>
<button onClick={() => setCount(count - 1)}>
Decrease count
</button>
<button
onClick={() => setCount(0)}
disabled={count === 0}>
Reset
</button>
<button onClick={() => setCount(count * 2)}>
Multiply
</button>

<p>Count: {count}</p>
{count > 140 && <p>You hit 140!</p>}
</div>
);
};

Loading