Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
84e30aa
Refactor application structure and add routing for Movie Company
Code-lab-web May 12, 2025
47fd0f2
Update .gitignore, modify button text, enhance CSS styles, and add Mo…
Code-lab-web May 13, 2025
c2f5ff2
Update dependencies, refactor About and Movies components, and add Po…
Code-lab-web May 13, 2025
742e124
Fix import statement for React to use react-router-dom
Code-lab-web May 13, 2025
be01b34
Code-lab-web
Code-lab-web May 13, 2025
9661ac8
Add Rollup external configuration for styled-components in Vite
Code-lab-web May 13, 2025
fb9fd95
Update package.json to add hooks dependency and upgrade Vite version
Code-lab-web May 13, 2025
3c9df80
Add react-router dependency to package.json
Code-lab-web May 13, 2025
6f992de
Add About, Movies, and Header components; update App component with r…
Code-lab-web May 13, 2025
3bf5cdd
Refactor App component structure; add MovieDetails and NotFound pages…
Code-lab-web May 14, 2025
d86ae78
Refactor Movies component; remove unused variable 'apikey'; update fe…
Code-lab-web May 15, 2025
23d1ee0
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
884e7f8
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
e11e2d4
Refactor API calls in tests; remove invalid lines; integrate image co…
Code-lab-web May 15, 2025
692c98a
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
07502f2
Code-lab-web
Code-lab-web May 15, 2025
6355a84
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
0026d5d
Code-lab-web
Code-lab-web May 15, 2025
1bf1fe5
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
b3f31a3
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
9026303
git commit -m "Code-lab-web"
Code-lab-web May 15, 2025
a60b47d
Refactor import paths for pages in App.jsx
Code-lab-web May 15, 2025
e6843f4
Fix syntax errors and improve component structure in Contact, Movies,…
Code-lab-web May 15, 2025
089e6ed
Fix API endpoint in Movies component for fetching popular movies
Code-lab-web May 16, 2025
6b48222
git commit -m "Code-lab-web"
Code-lab-web May 16, 2025
79d9ced
Merge pull request #1 from Code-lab-web/draft/objective-dijkstra
Code-lab-web May 16, 2025
9b08af3
Fix API key usage in Movies component and clean up CSS styles
Code-lab-web May 16, 2025
6f9e00d
git commit -m "Code-lab-web"
Code-lab-web May 16, 2025
9d2b9eb
Add dotenv dependency for environment variable management
Code-lab-web Jun 3, 2025
b1658a7
Add redirects configuration for improved URL management
Code-lab-web Jun 10, 2025
22d130b
Add express dependency and clean up main.jsx file
Code-lab-web Jun 12, 2025
f724b8b
Add movie data JSON and implement server-side API call for authentica…
Code-lab-web Jun 23, 2025
bec9acb
Add Material-UI and styled-components dependencies
Code-lab-web Jun 30, 2025
a02756a
Add @fontsource/roboto dependency for improved typography
Code-lab-web Jun 30, 2025
1780c62
Add Material-UI icons and Roboto font styles for enhanced UI
Code-lab-web Jun 30, 2025
4af47dd
Update react-dom dependency to version 19.1.0
Code-lab-web Jun 30, 2025
3fa4e68
git commit -m "Code-lab-web"
Code-lab-web Jul 16, 2025
b449feb
git commit -m "Code-lab-web"
Code-lab-web Jul 14, 2025
94a7cd4
git commit -m "Code-lab-web"
Code-lab-web Jul 15, 2025
4d3611f
git commit -m "Code-lab-web"
Code-lab-web Aug 14, 2025
2e966a6
git commit -m "Code-lab-web"
Aug 26, 2025
3916c1c
git commit -m "Code-lab-web"
Sep 2, 2025
ae633b3
git commit -m "Code-lab-web"
Sep 3, 2025
7a022aa
git commit -m "Code-lab-web"
Sep 4, 2025
532e2d6
git commit -m "Code-lab-web"
Sep 4, 2025
350f0e5
git commit -m "Code-lab-web"
Sep 4, 2025
efb9023
git commit -m "Code-lab-web"
Sep 5, 2025
cb84431
git commit -m "Code-lab-web"
Sep 5, 2025
5e49777
git commit -m "Code-lab-web"
Sep 5, 2025
01280c1
git commit -m "Code-lab-web"
Sep 5, 2025
b2ed99e
git commit-m "Code-lab-web"
Sep 5, 2025
d1d4fb8
git commit -m "Code-lab-web"
Sep 8, 2025
c3d4972
git commit -m "Code-lab-web"
Sep 16, 2025
7dda0f2
git commit -m "Code-lab-web"
Sep 16, 2025
ffb310e
git commit -m "Code-lab-web"
Sep 19, 2025
638dd9c
git commit -m "Code-lab-web"
Code-lab-web Oct 7, 2025
7dd439a
git commit -m "Code-lab-web"
Code-lab-web Oct 7, 2025
21a48a0
git commit -m "Code-lab-web"
Code-lab-web Oct 7, 2025
21e7178
git commit -m "Code-lab-web"
Code-lab-web Oct 7, 2025
344465a
git commit -m "Code-lab-web"
Code-lab-web Oct 8, 2025
a021799
git commit -m "Code-lab-web"
Code-lab-web Oct 13, 2025
190b682
git commit -m "Code-lab-web"
Code-lab-web Oct 14, 2025
f1c284f
git commit -m "Code-lab-web"
Oct 17, 2025
0e0fee4
git commit -m "Code-lab-web"
Oct 17, 2025
ad9e468
git commit -m "Code-lab-web"
Oct 17, 2025
aed7bc8
git commit -m "Code-lab-web"
Oct 17, 2025
419a8a1
git commit -m "Code-lab-web"
Oct 17, 2025
7b48c51
git commit -m "Code-lab-web"
Oct 17, 2025
c0a1eb4
git commit -m "Code-lab-web"
Oct 17, 2025
5516ae2
git commit -m "Code-lab-web"
Oct 17, 2025
bfae771
git commit -m "Code-lab-web"
Oct 17, 2025
d6ae271
git commit -m "Code-lab-web"
Oct 17, 2025
e70004c
git commit -m "Code-lab-web"
Oct 17, 2025
79065a1
git commit -m "Code-lab-web"
Oct 20, 2025
1f653c4
git commit -m ""
Oct 20, 2025
bf954c5
git commit -m "Code-lab-web"
Oct 20, 2025
dfca93f
git commit -m "Code-lab-web"
Code-lab-web Jan 20, 2026
b4bc8e0
git commit -m "Code-lab-web"
Code-lab-web Jan 20, 2026
55c789f
git commit -m "Code-lab-web"
Code-lab-web Jan 20, 2026
c8c29ef
git commit -m "Code-lab-web"
Code-lab-web Jan 20, 2026
be23859
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
547a3ed
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
1b798d8
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
d534bf8
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
4a08f3a
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
1ad29ce
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
53c5d15
git commit -m "Code-lab-web"
Code-lab-web Jan 21, 2026
50f9147
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
a7dd7ce
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
bdd72e5
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
294851e
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
4f756f1
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
947253f
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
af492db
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
476abcc
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
be5bfb7
git commit -m "Code-lab-web"
Code-lab-web Jan 23, 2026
65392e3
Create SECURITY.md for security policy
Code-lab-web Feb 16, 2026
5c77993
git commit -m "Code-lab-web"
Code-lab-web Feb 18, 2026
edd1683
git commit -m "Code-lab-web"
Code-lab-web Feb 18, 2026
1c77064
Add CRDA static analysis workflow
Code-lab-web Feb 18, 2026
248ce31
git commit -m "Code-lab-web"
Code-lab-web Feb 23, 2026
41739f4
git commit -m "Code-lab-web"
Code-lab-web Feb 23, 2026
54cbb09
git commit -m "Code-lab-web"
Code-lab-web Feb 23, 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
13 changes: 13 additions & 0 deletions .codesandbox/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# MongoDB Connection
MONGO_URL=mongodb://localhost/auth

# Server Configuration
PORT=8080
NODE_ENV=development

# TMDB API
VITE_TMDB_API_KEY=your_tmdb_api_key_here
TMDB_BEARER_TOKEN=your_tmdb_bearer_token_here

# Session Security
SESSION_SECRET=generate_a_strong_random_32_character_secret_here
73 changes: 73 additions & 0 deletions .codesandbox/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
var express = require('express');
var passport = require('passport');
var FacebookStrategy = require('passport-facebook');
var session = require('express-session');
var passport = require('passport');
var db = require('../db');
var router = express.Router();
passport.use(new FacebookStrategy({
clientID: process.env['FACEBOOK_CLIENT_ID'],
clientSecret: process.env['FACEBOOK_CLIENT_SECRET'],
callbackURL: '/oauth2/redirect/facebook',
state: true
}, function verify(accessToken, refreshToken, profile, cb) {
db.get('SELECT * FROM federated_credentials WHERE provider = ? AND subject = ?', [
'https://www.facebook.com',
profile.id
], function(err, row) {
if (err) { return cb(err); }
if (!row) {
db.run('INSERT INTO users (name) VALUES (?)', [
profile.displayName
], function(err) {
if (err) { return cb(err); }

var id = this.lastID;
db.run('INSERT INTO federated_credentials (user_id, provider, subject) VALUES (?, ?, ?)', [
id,
'https://www.facebook.com',
profile.id
], function(err) {
if (err) { return cb(err); }
var user = {
id: id,
name: profile.displayName
};
return cb(null, user);
});
});
} else {
db.get('SELECT * FROM users WHERE id = ?', [ row.user_id ], function(err, row) {
if (err) { return cb(err); }
if (!row) { return cb(null, false); }
return cb(null, row);
});
}
});
passport.serializeUser(function(user, cb) {
process.nextTick(function() {
cb(null, { id: user.id, username: user.username, name: user.name });
});
});

passport.deserializeUser(function(user, cb) {
process.nextTick(function() {
return cb(null, user);
});
});
}));
router.get('/login', function(req, res, next) {
res.render('login');
});
router.get('/login/federated/facebook', passport.authenticate('facebook'));
router.get('/oauth2/redirect/facebook', passport.authenticate('facebook', {
successRedirect: '/',
failureRedirect: '/login'
}));
router.post('/logout', function(req, res, next) {
req.logout(function(err) {
if (err) { return next(err); }
res.redirect('/');
});
});
module.exports = router;
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": {
"dev": {
"name": "dev",
"command": "pnpm dev",
"runAtStart": true
},
"build": {
"name": "build",
"command": "pnpm build",




9 changes: 9 additions & 0 deletions .codesandbox/touch routes/auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var express = require("express");

var router = express.Router();

router.get("/login", function (req, res, next) {
res.render("login");
});

module.exports = router;
126 changes: 126 additions & 0 deletions .github/workflows/crda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow performs a static analysis of your source code using
# Red Hat CodeReady Dependency Analytics.

# Scans are triggered:
# 1. On every push to default and protected branches
# 2. On every Pull Request targeting the default branch
# 3. On a weekly schedule
# 4. Manually, on demand, via the "workflow_dispatch" event

# 💁 The CRDA Starter workflow will:
# - Checkout your repository
# - Setup the required tool stack
# - Install the CRDA command line tool
# - Auto detect the manifest file and install the project's dependencies
# - Perform the security scan using CRDA
# - Upload the SARIF result to the GitHub Code Scanning which can be viewed under the security tab
# - Optionally upload the SARIF file as an artifact for the future reference

# ℹ️ Configure your repository and the workflow with the following steps:
# 1. Setup the tool stack based on the project's requirement.
# Refer to: https://github.com/redhat-actions/crda/#1-set-up-the-tool-stack
# 2. (Optional) CRDA action attempt to detect the language and install the
# required dependencies for your project. If your project doesn't aligns
# with the default dependency installation command mentioned here
# https://github.com/redhat-actions/crda/#3-installing-dependencies.
# Use the required inputs to setup the same
# 3. (Optional) CRDA action attempts to detect the manifest file if it is
# present in the root of the project and named as per the default mentioned
# here https://github.com/redhat-actions/crda/#3-installing-dependencies.
# If it deviates from the default, use the required inputs to setup the same
# 4. Setup Authentication - Create the CRDA_KEY or SNYK_TOKEN.
# Refer to: https://github.com/redhat-actions/crda/#4-set-up-authentication
# 5. (Optional) Upload SARIF file as an Artifact to download and view
# 6. Commit and push the workflow file to your default branch to trigger a workflow run.

# 👋 Visit our GitHub organization at https://github.com/redhat-actions/ to see our actions and provide feedback.

name: CRDA Scan

# Controls when the workflow will run
on:
# TODO: Customize trigger events based on your DevSecOps processes
#
# This workflow is made to run with OpenShift starter workflow
# https://github.com/actions/starter-workflows/blob/main/deployments/openshift.yml
# However, if you want to run this workflow as a standalone workflow, please
# uncomment the 'push' trigger below and configure it based on your requirements.
#
workflow_call:
secrets:
CRDA_KEY:
required: false
SNYK_TOKEN:
required: false
workflow_dispatch:

# push:
# branches: [ "main" ]

# pull_request_target is used to securely share secret to the PR's workflow run.
# For more info visit: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
pull_request_target:
branches: [ "main" ]
types: [ assigned, opened, synchronize, reopened, labeled, edited ]

permissions:
contents: read

jobs:
crda-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for redhat-actions/crda to upload SARIF results
name: Scan project vulnerabilities with CRDA
runs-on: ubuntu-latest
steps:

- name: Check out repository
uses: actions/checkout@v4

# *******************************************************************
# Required: Instructions to setup project
# 1. Setup Go, Java, Node.js or Python depending on your project type
# 2. Setup Actions are listed below, choose one from them:
# - Go: https://github.com/actions/setup-go
# - Java: https://github.com/actions/setup-java
# - Node.js: https://github.com/actions/setup-node
# - Python: https://github.com/actions/setup-python
#
# Example:
# - name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version: '20'

# https://github.com/redhat-actions/openshift-tools-installer/blob/main/README.md
- name: Install CRDA CLI
uses: redhat-actions/openshift-tools-installer@v1
with:
source: github
github_pat: ${{ github.token }}
# Choose the desired version of the CRDA CLI
crda: "latest"

######################################################################################
# https://github.com/redhat-actions/crda/blob/main/README.md
#
# By default, CRDA will detect the manifest file and install the required dependencies
# using the standard command for the project type.
# If your project doesn't aligns with the defaults mentioned in this action, you will
# need to set few inputs that are described here:
# https://github.com/redhat-actions/crda/blob/main/README.md#3-installing-dependencies
# Visit https://github.com/redhat-actions/crda/#4-set-up-authentication to understand
# process to get a SNYK_TOKEN or a CRDA_KEY
- name: CRDA Scan
id: scan
uses: redhat-actions/crda@v1
with:
crda_key: ${{ secrets.CRDA_KEY }} # Either use crda_key or snyk_token
# snyk_token: ${{ secrets.SNYK_TOKEN }}
# upload_artifact: false # Set this to false to skip artifact upload
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ package-lock.json
*.njsproj
*.sln
*.sw?
.env

# Local Netlify folder
.netlify
.env

# Database
*.db
sessions.db
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
{ pkgs, ... }: {
# 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";
};
};
};
}
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
9 changes: 9 additions & 0 deletions _redirects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

/home /
/blog/my-post.php /blog/my-post
/news /blog
/cuties https://www.petsofnetlify.com
/authors/c%C3%A9line /authors/about-c%C3%A9line
/blog/my-old-title /blog/my-new-title
/blog/my-old-title /blog/an-even-better-title
/* index.html 200
12 changes: 12 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require("dotenv").config();
// ... other imports ...

app.use(
session({
secret:
process.env.SESSION_SECRET || crypto.randomBytes(32).toString("hex"),
resave: false,
saveUninitialized: false,
store: new SQLiteStore({ db: "sessions.db", dir: "./var/db" }),
})
);
File renamed without changes.
Loading