From fbdedf8a445be5050e3e3b3fcff3df3ed9b5ab03 Mon Sep 17 00:00:00 2001 From: AnishCoder2006 Date: Wed, 27 May 2026 10:02:00 +0530 Subject: [PATCH 1/3] feat(bookmarks): add bookmarks API, User.bookmarks, and frontend UI --- github_tracker | 1 + playground-1.mongodb.js | 43 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 160000 github_tracker create mode 100644 playground-1.mongodb.js diff --git a/github_tracker b/github_tracker new file mode 160000 index 00000000..286b724c --- /dev/null +++ b/github_tracker @@ -0,0 +1 @@ +Subproject commit 286b724c8c203d309f84c09c9f7e835306227040 diff --git a/playground-1.mongodb.js b/playground-1.mongodb.js new file mode 100644 index 00000000..8737dc52 --- /dev/null +++ b/playground-1.mongodb.js @@ -0,0 +1,43 @@ +/* global use, db */ +// MongoDB Playground +// To disable this template go to Settings | MongoDB | Use Default Template For Playground. +// Make sure you are connected to enable completions and to be able to run a playground. +// Use Ctrl+Space inside a snippet or a string literal to trigger completions. +// The result of the last command run in a playground is shown on the results panel. +// By default the first 20 documents will be returned with a cursor. +// Use 'console.log()' to print to the debug output. +// For more documentation on playgrounds please refer to +// https://www.mongodb.com/docs/mongodb-vscode/playgrounds/ + +// Select the database to use. +use('mongodbVSCodePlaygroundDB'); + +// Insert a few documents into the sales collection. +db.getCollection('sales').insertMany([ + { 'item': 'abc', 'price': 10, 'quantity': 2, 'date': new Date('2014-03-01T08:00:00Z') }, + { 'item': 'jkl', 'price': 20, 'quantity': 1, 'date': new Date('2014-03-01T09:00:00Z') }, + { 'item': 'xyz', 'price': 5, 'quantity': 10, 'date': new Date('2014-03-15T09:00:00Z') }, + { 'item': 'xyz', 'price': 5, 'quantity': 20, 'date': new Date('2014-04-04T11:21:39.736Z') }, + { 'item': 'abc', 'price': 10, 'quantity': 10, 'date': new Date('2014-04-04T21:23:13.331Z') }, + { 'item': 'def', 'price': 7.5, 'quantity': 5, 'date': new Date('2015-06-04T05:08:13Z') }, + { 'item': 'def', 'price': 7.5, 'quantity': 10, 'date': new Date('2015-09-10T08:43:00Z') }, + { 'item': 'abc', 'price': 10, 'quantity': 5, 'date': new Date('2016-02-06T20:20:13Z') }, +]); + +// Run a find command to view items sold on April 4th, 2014. +const salesOnApril4th = db.getCollection('sales').find({ + date: { $gte: new Date('2014-04-04'), $lt: new Date('2014-04-05') } +}).count(); + +// Print a message to the output window. +console.log(`${salesOnApril4th} sales occurred in 2014.`); + +// Here we run an aggregation and open a cursor to the results. +// Use '.toArray()' to exhaust the cursor to return the whole result set. +// You can use '.hasNext()/.next()' to iterate through the cursor page by page. +db.getCollection('sales').aggregate([ + // Find all of the sales that occurred in 2014. + { $match: { date: { $gte: new Date('2014-01-01'), $lt: new Date('2015-01-01') } } }, + // Group the total sales for each product. + { $group: { _id: '$item', totalSaleAmount: { $sum: { $multiply: [ '$price', '$quantity' ] } } } } +]); From f90173c1a316f95fc5b317adf732a3b812f3cc75 Mon Sep 17 00:00:00 2001 From: AnishCoder2006 Date: Wed, 27 May 2026 10:04:06 +0530 Subject: [PATCH 2/3] chore: remove unintended files from commit --- playground-1.mongodb.js | 43 ----------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 playground-1.mongodb.js diff --git a/playground-1.mongodb.js b/playground-1.mongodb.js deleted file mode 100644 index 8737dc52..00000000 --- a/playground-1.mongodb.js +++ /dev/null @@ -1,43 +0,0 @@ -/* global use, db */ -// MongoDB Playground -// To disable this template go to Settings | MongoDB | Use Default Template For Playground. -// Make sure you are connected to enable completions and to be able to run a playground. -// Use Ctrl+Space inside a snippet or a string literal to trigger completions. -// The result of the last command run in a playground is shown on the results panel. -// By default the first 20 documents will be returned with a cursor. -// Use 'console.log()' to print to the debug output. -// For more documentation on playgrounds please refer to -// https://www.mongodb.com/docs/mongodb-vscode/playgrounds/ - -// Select the database to use. -use('mongodbVSCodePlaygroundDB'); - -// Insert a few documents into the sales collection. -db.getCollection('sales').insertMany([ - { 'item': 'abc', 'price': 10, 'quantity': 2, 'date': new Date('2014-03-01T08:00:00Z') }, - { 'item': 'jkl', 'price': 20, 'quantity': 1, 'date': new Date('2014-03-01T09:00:00Z') }, - { 'item': 'xyz', 'price': 5, 'quantity': 10, 'date': new Date('2014-03-15T09:00:00Z') }, - { 'item': 'xyz', 'price': 5, 'quantity': 20, 'date': new Date('2014-04-04T11:21:39.736Z') }, - { 'item': 'abc', 'price': 10, 'quantity': 10, 'date': new Date('2014-04-04T21:23:13.331Z') }, - { 'item': 'def', 'price': 7.5, 'quantity': 5, 'date': new Date('2015-06-04T05:08:13Z') }, - { 'item': 'def', 'price': 7.5, 'quantity': 10, 'date': new Date('2015-09-10T08:43:00Z') }, - { 'item': 'abc', 'price': 10, 'quantity': 5, 'date': new Date('2016-02-06T20:20:13Z') }, -]); - -// Run a find command to view items sold on April 4th, 2014. -const salesOnApril4th = db.getCollection('sales').find({ - date: { $gte: new Date('2014-04-04'), $lt: new Date('2014-04-05') } -}).count(); - -// Print a message to the output window. -console.log(`${salesOnApril4th} sales occurred in 2014.`); - -// Here we run an aggregation and open a cursor to the results. -// Use '.toArray()' to exhaust the cursor to return the whole result set. -// You can use '.hasNext()/.next()' to iterate through the cursor page by page. -db.getCollection('sales').aggregate([ - // Find all of the sales that occurred in 2014. - { $match: { date: { $gte: new Date('2014-01-01'), $lt: new Date('2015-01-01') } } }, - // Group the total sales for each product. - { $group: { _id: '$item', totalSaleAmount: { $sum: { $multiply: [ '$price', '$quantity' ] } } } } -]); From fff14669c6ba39a3e8263415de41ea5a2c7a77aa Mon Sep 17 00:00:00 2001 From: AnishCoder2006 Date: Thu, 28 May 2026 09:05:18 +0530 Subject: [PATCH 3/3] Add Netlify config and header/redirect rules for deploy checks --- netlify.toml | 17 +++++++++++++++++ public/_headers | 5 +++++ public/_redirects | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 netlify.toml create mode 100644 public/_headers diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..f707725b --- /dev/null +++ b/netlify.toml @@ -0,0 +1,17 @@ +[build] + command = "npm install && npm run build" + publish = "dist" + environment = { NODE_VERSION = "18" } + +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-Content-Type-Options = "nosniff" + Referrer-Policy = "strict-origin-when-cross-origin" + Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 diff --git a/public/_headers b/public/_headers new file mode 100644 index 00000000..0af4b09d --- /dev/null +++ b/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Strict-Transport-Security: max-age=63072000; includeSubDomains; preload diff --git a/public/_redirects b/public/_redirects index 4e31746d..5b1b4300 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1,2 +1,2 @@ -/* /index.html 200 +/* /index.html 200