Compare commits

...
Author SHA1 Message Date
Joaquin 54566f05b7 feature/fully implemented ejs inclusion to main files 2025-05-05 21:56:47 -07:00
Joaquin decdb299b7 Merge branch 'dev' of https://github.com/JoaquinPar/2800-202510-BBY14 into feature/layoutPage 2025-05-05 21:17:50 -07:00
Joaquin c8bf2e49ab feature/completed most of ejs implementation into other pages 2025-05-05 21:12:52 -07:00
nicoagostini f39b8555fa fix/session check fixed 2025-05-05 18:59:59 -07:00
nicoagostini fef7184404 fix/home.ejs include fix 2025-05-05 18:45:59 -07:00
SowinskiBraeden 6a8595d24b fix/impliment middleware 2025-05-05 18:39:43 -07:00
SowinskiBraeden 7c7098636a fix/middleware authentication + bad merge 2025-05-05 18:34:19 -07:00
Nícolas Agostini a446943d4a Merge pull request #2 from JoaquinPar/feature/questionnaire
Just a bug fix
2025-05-05 18:18:55 -07:00
Nícolas Agostini 612bb262d1 Merge branch 'dev' into feature/questionnaire 2025-05-05 18:18:45 -07:00
nicoagostini 6819b82723 Just a bug fix 2025-05-05 18:17:35 -07:00
SowinskiBraeden 5b1b36a553 fix/compare password on sign in 2025-05-05 18:12:19 -07:00
SowinskiBraeden 1114789e57 Merge latest dev into dev 2025-05-05 17:34:24 -07:00
SowinskiBraeden bb6e2eba2c fix/user routing 2025-05-05 17:33:27 -07:00
Joaquin f6640b23cf feature/some progress made on layouts 2025-05-05 17:07:51 -07:00
nicoagostini d0aa7a0fbd Landing moved to be the index page, routes added and landing page image route fixed 2025-05-05 16:46:16 -07:00
Joaquin 4be7ca3a8e Merge branch 'dev' into feature/layoutPage 2025-05-05 16:30:51 -07:00
Joaquin 10541d2428 merge feature/navBar with dev 2025-05-05 16:26:01 -07:00
Joaquin 8b6ff1354b resolved merge conflict 2025-05-05 14:27:24 -07:00
Joaquin 4bcf8dd812 feature/started work on layout.ejs 2025-05-05 14:21:30 -07:00
SowinskiBraeden fe7152b03b update/create middleware 2025-05-05 14:16:50 -07:00
SowinskiBraeden 87cad63425 update/return status codes 2025-05-05 13:17:30 -07:00
SowinskiBraeden d08fd30888 login/signup function with no sessions 2025-05-02 13:19:14 -07:00
SowinskiBraeden 7ef6282ac0 update login/signup.ejs pages 2025-05-02 13:18:51 -07:00
SowinskiBraeden 0e4d4d7daf fix project structure & static file 2025-05-02 11:41:13 -07:00
26 changed files with 1280 additions and 331 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
mongoURI='mongodb://localhost:27017/'
database='nameOfDatabase'
PORT=8000
secret='123456789'
+6 -3
View File
@@ -54,9 +54,12 @@ Example:
retirementCalculator/
├── src/
│ ├── views/
| ── css/
| ├── images/
| ── scripts/
│ │ ── partials/
├── css/
── images/
│ ├── scripts/
│ └── utils/
├── app.js
├── .env.example
├── .gitignore
+58 -62
View File
@@ -1,94 +1,90 @@
const status = require("./src/util/statuses");
const MongoStore = require("connect-mongo");
const session = require("express-session");
const express = require('express');
const path = require('path');
const dotenv = require('dotenv');
dotenv.config();
require('dotenv').config();
const app = express();
const port = process.env.PORT || 3000;
const mongoURI = process.env.mongoURI || "mongodb://localhost:27017/";
const database = process.env.database || "knoldus"; // Database name
const secret = process.env.secret || "123-secret-xyz";
/*** Sessions ***/
app.use(session({
secret: secret,
store: MongoStore.create({ mongoUrl: `${mongoURI}${database}`, crypto: { secret: secret } }),
resave: true,
saveUninitialized: false,
cookie: { maxAge: 60000 },
}));
app.set('view engine', 'ejs');
app.set('views',path.join(__dirname, 'src/views'));
app.use(express.urlencoded({ extended: true }));
app.use("/static", express.static("./src/public"));
app.use("/images", express.static("./src/public/images"));
/*** Database ***/
const { connectMongo, getCollection } = require("./src/database/connection");
/*
STATIC ROUTINGS
*/
let users;
async function initDatabase() {
const db = await connectMongo(mongoURI, database);
// For any collection, init here
users = await getCollection(db, "users");
}
app.use("/scripts", express.static("./src/scripts"));
app.use("/css", express.static("./src/css"));
app.use("/images", express.static("./src/images"));
app.use("/views", express.static("./src/views"));
/*
ROUTINGS
*/
/*** ROUTINGS ***/
app.get('/', (req, res) => {
res.render('index');
});
app.get('/landing', (req, res) => {
if (!req.session.errMessage) req.session.errMessage = "";
res.render('landing');
return res.status(status.Ok);
});
app.get('/signup', (req, res) => {
res.render('signup');
res.render('signup', { errMessage: req.session.errMessage });
return res.status(status.Ok);
});
app.get('/login', (req, res) => {
res.render('login');
});
app.get('/home', (req, res) => {
res.render('home');
});
app.get('/assets', (req, res) => {
res.render('assets');
});
app.get('/plans', (req, res) => {
res.render('plans');
});
app.get('/more', (req, res) => {
res.render('more');
});
app.get('/profile', (req, res) => {
res.render('profiles');
});
app.get('/settings', (req, res) => {
res.render('settings');
if (req.session.authenticated) {
res.redirect("/home");
return res.status(status.Ok);
}
res.render('login', { errMessage: req.session.errMessage });
return res.status(status.Ok);
});
app.get('/aboutUs', (req, res) => {
res.render('aboutUs');
return res.status(status.Ok);
});
app.post('/signup', (req, res) => {
res.status(200);
res.send('200 status code');
});
// Initialize database and start app
initDatabase().then(() => {
console.log("Successfully connected to MongoDB");
app.post('/login', (req, res) => {
res.status(200);
res.send('200 status code');
});
// Import authentication handler
app.use(require("./src/auth/authentication")(users));
app.get('/*splat', (req, res) => {
res.status(404);
res.send('404 Not Found');
});
// Import middleware & apply to user routes
const middleware = require("./src/auth/middleware")(users);
app.use(require('./src/router/user')(middleware));
app.listen(port, () => {
console.log(`Server listening on port ${port}`);
// 404 handler
app.get('/*splat', (req, res) => {
res.send('404 Not Found');
return res.status(status.NotFound);
});
// Start app
app.listen(port, () => {
console.log(`Server listening on port ${port}`);
});
});
+841 -2
View File
File diff suppressed because it is too large. Load diff
+6 -1
View File
@@ -18,9 +18,14 @@
},
"homepage": "https://github.com/JoaquinPar/2800-202510-BBY14#readme",
"dependencies": {
"bcrypt": "^5.1.1",
"connect-mongo": "^5.1.0",
"dotenv": "^16.5.0",
"ejs": "^3.1.10",
"express": "^5.1.0"
"express": "^5.1.0",
"express-session": "^1.18.1",
"joi": "^17.13.3",
"mongodb": "^6.16.0"
},
"devDependencies": {
"nodemon": "^3.1.10"
+102
View File
@@ -0,0 +1,102 @@
const status = require("../util/statuses");
const bcrypt = require('bcrypt');
const joi = require("joi");
const salt = 12;
module.exports = (users) => {
const router = require("express").Router();
router.get("/logout", (req, res) => {
req.session.destroy();
// res.status(status.Unauthorized);
return res.redirect('/login');
});
router.post("/login", async (req, res) => {
if (req.session.authenticated) {
res.redirect("/home");
return res.status(status.Ok);
}
const credentialSchema = joi.object({
email: joi.string().email().required(),
password: joi.string().max(20).required(),
});
const valid = credentialSchema.validate(req.body);
if (valid.err) {
req.session.errMessage = "Invalid input";
res.status(status.BadRequest);
return res.redirect("/login");
}
users.findOne({ "email": req.body.email }).then((user) => {
if (!user) {
req.session.errMessage = "User not found";
res.status(status.NotFound);
return res.redirect("/login");
}
if (!bcrypt.compareSync(req.body.password, user.password)) {
req.session.errMessage = "Incorrect password";
res.status(status.Unauthorized);
return res.redirect("/login");
}
req.session.authenticated = true;
req.session.email = req.body.email;
req.session.errMessage = "";
res.redirect("/home");
return res.status(status.Ok);
});
});
router.post("/signup", async (req, res) => {
const userSchema = joi.object({
email: joi.string().email().required(),
// name: joi.string().alphanum().max(20).required(),
password: joi.string().max(20).min(8).required(),
repassword: joi.string().max(20).min(8).required(),
});
const valid = userSchema.validate(req.body);
if (valid.err) {
req.session.errMessage = "Invalid input",
res.status(status.BadRequest);
return res.redirect("/signup");
}
if (req.body.password != req.body.repassword) {
req.session.errMessage = "Passwords must match";
res.status(status.BadRequest);
return res.redirect("/signup");
}
let hashedPassword = await bcrypt.hashSync(req.body.password, salt);
users.insertOne({
email: req.body.email,
// name: req.body.name,
password: hashedPassword,
}).then((results, err) => {
if (err) {
res.status(status.InternalServerError);
console.error(err);
return res.send("Internal server error");
}
req.session.authenticated = true;
req.session.email = req.body.email;
req.session.errMessage = "";
res.status(status.Ok);
return res.redirect("/home");
});
});
return router;
}
+29
View File
@@ -0,0 +1,29 @@
const status = require("../util/statuses");
/**
* createMiddleware returns a middleware function for express.
* @param {MongoClient.collection} users
* @return {async function}
*/
const createMiddleware = (users) => {
return async (req, res, next) => {
if (!req.session.authenticated || !req.session.email) {
req.session.errMessage = "Please login to view that resource";
res.redirect("/login");
return res.status(status.Unauthorized);
}
let user = await users.findOne({ "email": req.session.email }).then((user) => user);
if (!user) {
req.session.errMessage = "User not found";
res.redirect("/login");
return res.status(status.Unauthorized);
}
req.user = user;
next();
};
}
module.exports = createMiddleware;
+27
View File
@@ -0,0 +1,27 @@
const MongoClient = require("mongodb").MongoClient;
/**
* connectMongo returns a database connection to MongoDB
* @param {string} mongoURI
* @param {string} databaseName
* @return {MongoClient}
*/
const connectMongo = async (mongoURI, databaseName) => {
const database = await MongoClient.connect(mongoURI, { connectTimeoutMS: 1000 });
const dbo = database.db(databaseName);
return dbo;
}
/**
* getCollection object to interact with MongoDB
* @param {MongoClient} dbo
* @param {string} collection
*/
const getCollection = async (dbo, collection) => {
return await dbo.collection(collection);
}
module.exports = {
connectMongo: connectMongo,
getCollection: getCollection,
}
File renamed without changes.
+44
View File
@@ -0,0 +1,44 @@
const status = require("../util/statuses");
module.exports = (middleware) => {
const router = require("express").Router();
router.use(middleware);
router.get('/home', async (req, res) => {
res.render('home', { user: req.user });
return res.status(status.Ok);
});
router.get('/assets', (req, res) => {
res.render('assets', { user: req.user });
return res.status(status.Ok);
});
router.get('/plans', (req, res) => {
res.render('plans', { user: req.user });
return res.status(status.Ok);
});
router.get('/more', (req, res) => {
res.render('more', { user: req.user });
return res.status(status.Ok);
});
router.get('/profile', (req, res) => {
res.render('profiles', { user: req.user });
return res.status(status.Ok);
});
router.get('/settings', (req, res) => {
res.render('settings', { user: req.user });
return res.status(status.Ok);
});
router.get('/logout', (req, res) => {
req.session.destroy();
return res.redirect('/login');
});
return router;
};
+7
View File
@@ -0,0 +1,7 @@
module.exports = {
Ok: 200,
BadRequest: 400,
Unauthorized: 401,
NotFound: 404,
InternalServerError: 500,
};
+36 -53
View File
@@ -1,56 +1,39 @@
<html>
<head>
<title>RCalculator</title>
<link rel="icon" href="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png">
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.2/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-white dark:bg-gray-900">
<%- include("./partials/headerStart") %>
<main>
<section class="bg-white dark:bg-gray-900 py-12 md:py-20">
<div class="max-w-screen-lg mx-auto px-4 text-center">
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 md:text-5xl lg:text-6xl dark:text-white">About RCalculator</h1>
<p class="mb-12 text-lg font-normal text-gray-500 lg:text-xl sm:px-16 dark:text-gray-400">Welcome to RCalculator, your partner in building a secure and fulfilling financial future.</p>
</div>
<%- include("./partials/fileHeader") %>
<%- include("./partials/headerStart") %>
<div class="max-w-screen-md mx-auto px-4">
<h2 class="mb-4 text-3xl font-bold tracking-tight text-gray-900 dark:text-white text-center">Our Mission</h2>
<p class="mb-6 font-normal text-gray-600 dark:text-gray-400 text-lg text-center">
Our mission is to empower you with the tools and insights needed to take control of your long-term financial goals.
</p>
<div class="prose lg:prose-lg dark:prose-invert mx-auto text-gray-600 dark:text-gray-400">
<p class="mb-4">
We believe that planning for your desired future, especially retirement, shouldn't be daunting. It doesn't matter what your current age or career status is starting now is what counts.
</p>
<p class="mb-4">
At RCalculator, we help you trace a personalized plan that suits your unique aspirations. We provide clear, actionable advice and projections to guide you on how to get there, whether you're just starting your career, mid-way through, or nearing retirement.
</p>
<p>
Let us help you navigate the path to financial independence and achieve the retirement lifestyle you envision.
</p>
</div>
</div>
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
<a href="/login" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
Get started
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
</svg>
</a>
</div>
</section>
</main>
<footer>
<div class="fixed bottom-0 left-0 z-50 hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
<main>
<section class="bg-white dark:bg-gray-900 py-12 md:py-20">
<div class="max-w-screen-lg mx-auto px-4 text-center">
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 md:text-5xl lg:text-6xl dark:text-white">About RCalculator</h1>
<p class="mb-12 text-lg font-normal text-gray-500 lg:text-xl sm:px-16 dark:text-gray-400">Welcome to RCalculator, your partner in building a secure and fulfilling financial future.</p>
</div>
<div class="max-w-screen-md mx-auto px-4">
<h2 class="mb-4 text-3xl font-bold tracking-tight text-gray-900 dark:text-white text-center">Our Mission</h2>
<p class="mb-6 font-normal text-gray-600 dark:text-gray-400 text-lg text-center">
Our mission is to empower you with the tools and insights needed to take control of your long-term financial goals.
</p>
<div class="prose lg:prose-lg dark:prose-invert mx-auto text-gray-600 dark:text-gray-400">
<p class="mb-4">
We believe that planning for your desired future, especially retirement, shouldn't be daunting. It doesn't matter what your current age or career status is starting now is what counts.
</p>
<p class="mb-4">
At RCalculator, we help you trace a personalized plan that suits your unique aspirations. We provide clear, actionable advice and projections to guide you on how to get there, whether you're just starting your career, mid-way through, or nearing retirement.
</p>
<p>
Let us help you navigate the path to financial independence and achieve the retirement lifestyle you envision.
</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>
</body>
</html>
</div>
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
<a href="/signup" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
Get started
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
</svg>
</a>
</div>
</section>
</main>
<!--fixed bottom-0 left-0 z-50 lg:hidden w-full h-16 bg-white border-t border-gray-200 dark:bg-gray-400-->
<%- include("./partials/footer") %>
+9 -23
View File
@@ -1,23 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>Document</title>
</head>
<body>
<%- include("./partials/header") %>
<main>
The Assets Page
</main>
<footer>
<div class="fixed bottom-0 left-0 z-50 hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
</div>
<%- include("./partials/navBar") %>
</footer>
</body>
</html>
<%- include("./partials/fileHeader") %>
<%- include("./partials/header") %>
<main>
The Assets Page
</main>
<%- include("./partials/navBar") %>
<%- include("./partials/footer") %>
+8 -24
View File
@@ -1,26 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<%- include("./partials/fileHeader") %>
<%- include("./partials/header") %>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>Document</title>
</head>
<main>
Welcome: <%= user.email %>
The Dashboard Page
</main>
<body>
<%- include("./partials/header") %>
<main>
The Dashboard Page
</main>
<footer>
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
</div>
<%- include("./partials/navBar") %>
</footer>
</body>
</html>
<%- include("./partials/navBar") %>
<%- include("./partials/footer") %>
+6 -20
View File
@@ -1,23 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<%- include("./partials/fileHeader") %>
<%- include("./partials/header") %>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>Document</title>
</head>
<body>
<main>
The Index Page
<footer>
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
</div>
<%- include("./partials/navBar") %>
</footer>
</body>
</main>
</html>
<%- include("./partials/navBar") %>
<%- include("./partials/footer") %>
+23 -37
View File
@@ -1,38 +1,24 @@
<html>
<head>
<title>RCalculator</title>
<link rel="icon" href="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png">
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.2/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-white dark:bg-gray-900">
<%- include("./partials/headerStart") %>
<main>
<section class="bg-center bg-no-repeat bg-cover bg-[url('/images/bg1.jpg')] bg-gray-400 bg-blend-multiply">
<div class="px-4 mx-auto max-w-screen-xl text-center py-24 lg:py-56">
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-white md:text-5xl lg:text-6xl">Plan now, live better.</h1>
<p class="mb-8 text-lg font-normal text-gray-300 lg:text-xl sm:px-16 lg:px-48">Planning your retirement is a crucial step towards financial security and a happy future.</p>
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
<a href="/login" class="inline-flex justify-center items-center py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
Get started
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
</svg>
</a>
<a href="/aboutUs" class="inline-flex justify-center hover:text-gray-900 items-center py-3 px-5 sm:ms-4 text-base font-medium text-center text-white rounded-lg border border-white hover:bg-gray-100 focus:ring-4 focus:ring-gray-400">
Learn more
</a>
</div>
</div>
</section>
</main>
<footer>
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
<%- include("./partials/fileHeader") %>
<%- include("./partials/headerStart") %>
<main>
<section class="bg-center bg-no-repeat bg-cover bg-[url('/images/bg1.jpg')] bg-gray-400 bg-blend-multiply">
<div class="px-4 mx-auto max-w-screen-xl text-center py-24 lg:py-56">
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-white md:text-5xl lg:text-6xl">Plan now, live better.</h1>
<p class="mb-8 text-lg font-normal text-gray-300 lg:text-xl sm:px-16 lg:px-48">Planning your retirement is a crucial step towards financial security and a happy future.</p>
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
<a href="/signup" class="inline-flex justify-center items-center py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
Get started
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
</svg>
</a>
<a href="/aboutUs" class="inline-flex justify-center hover:text-gray-900 items-center py-3 px-5 sm:ms-4 text-base font-medium text-center text-white rounded-lg border border-white hover:bg-gray-100 focus:ring-4 focus:ring-gray-400">
Learn more
</a>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>
</body>
</html>
</div>
</section>
</main>
<%- include("./partials/footer") %>
+10 -19
View File
@@ -1,19 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<%- include("./partials/fileHeader") %>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<link rel="stylesheet" href="/css/style.css" <link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="../public/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.2/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>
<div class="flex justify-center items-center h-screen bg-gray-700">
<main>
<div class="flex justify-center items-center h-screen">
<form action="/login" method="POST">
<div class="w-96 p-6 shadow-1g bg-white rounded-md">
<h1 class="text-3xl block text-center font-semibold"> Login </h1>
@@ -30,7 +18,7 @@
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
placeholder="Enter Password" />
</div>
<div class="text-red-800 font-bold hidden" id="forgor"> Your Password is incorrect...</div>
<div class="text-red-800 font-bold" id="forgor"> <%= errMessage %></div>
<div class="mt-3 flex justify-between items-center">
<div>
<input type="checkbox">
@@ -44,10 +32,13 @@
<button type="submit"
class="border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-indigo-700 font-semibold">Login</button>
</div>
<div class="mt-5 block justify-between items-center">
<label>Don't have an account?</label>
<a href="/signup" class="text-indigo-600 font-semibold">Register</a>
</div>
</div>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</body>
</main>
</html>
<%- include("./partials/footer") %>
+8 -23
View File
@@ -1,25 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>Document</title>
</head>
<%- include("./partials/fileHeader") %>
<%- include("./partials/header") %>
<body>
<%- include("./partials/header") %>
<main>
The More Page
</main>
<footer>
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
</div>
<%- include("./partials/navBar") %>
</footer>
</body>
<main>
The More Page
</main>
</html>
<%- include("./partials/navBar") %>
<%- include("./partials/footer") %>
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>RCalculator</title>
</head>
<body class="bg-white dark:bg-gray-900">
+10
View File
@@ -0,0 +1,10 @@
<footer>
<div class="fixed bottom-0 left-0 z-50 hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>
+5 -2
View File
@@ -1,7 +1,7 @@
<header>
<nav class="bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="#" class="flex items-center space-x-3 rtl:space-x-reverse">
<a href="/home" class="flex items-center space-x-3 rtl:space-x-reverse">
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
</a>
@@ -18,7 +18,10 @@
</li>
<li>
<a href="/more" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">More</a>
</li>
</li>
<li>
<a href="/logout" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Logout</a>
</li>
</ul>
</div>
</div>
+3 -3
View File
@@ -1,7 +1,7 @@
<header>
<nav class="bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="#" class="flex items-center space-x-3 rtl:space-x-reverse">
<a href="/" class="flex items-center space-x-3 rtl:space-x-reverse">
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
</a>
@@ -17,10 +17,10 @@
<div class="hidden w-full lg:block lg:w-auto" id="navbar-solid-bg">
<ul class="flex flex-col font-medium mt-4 rounded-lg bg-gray-50 lg:space-x-8 rtl:space-x-reverse lg:flex-row lg:mt-0 lg:border-0 lg:bg-transparent dark:bg-gray-800 lg:dark:bg-transparent dark:border-gray-700">
<li>
<a href="/landing" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Home</a>
<a href="/" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Home</a>
</li>
<li>
<a href="/aboutUs" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">About Us</a>
<a href="/login" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Login</a>
</li>
<li>
<a href="mailto:rcalculator@gmail.com" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Contact us</a>
+1 -2
View File
@@ -26,5 +26,4 @@
<span class="text-gray-500 dark:text-gray-400 text-sm">More</span>
</a>
</div>
</div>
</div>
+7 -24
View File
@@ -1,26 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<%- include("./partials/fileHeader") %>
<%- include("./partials/header") %>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title>Document</title>
</head>
<main>
The Plans Page
</main>
<body>
<%- include("./partials/header") %>
<main>
The Plans Page
</main>
<footer>
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
<div class="container mx-auto">
<p>&copy; 2025 RCalculator. All rights reserved.</p>
</div>
</div>
<%- include("./partials/navBar") %>
</footer>
</body>
</html>
<%- include("./partials/navBar") %>
<%- include("./partials/footer") %>
+14 -32
View File
@@ -1,21 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<%- include("./partials/fileHeader") %>
<%- include("./partials/headerStart") %>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signup</title>
<link rel="stylesheet" href="/css/style.css" <link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="../public/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="flex justify-center items-center h-screen bg-gray-700">
<form action="/login" method="POST">
<main>
<div class="flex justify-center items-center h-screen">
<form action="/signup" method="POST">
<div class="w-96 p-6 shadow-1g bg-white rounded-md">
<h1 class="text-3xl block text-center font-semibold"> Signup </h1>
<hr class="mt-3">
@@ -31,28 +19,22 @@
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
placeholder="Enter Password" />
<label for="password" class="block text-base mb-2 mt-3">Re-type Password</label>
<input type="password" id="repassword" name="password"
<input type="password" id="repassword" name="repassword"
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
placeholder="Enter Password" />
</div>
<div class="text-red-800 font-bold hidden" id="forgor"> Your Password is incorrect...</div>
<div class="mt-3 flex justify-between items-center">
<div>
<input type="checkbox">
<label>Remember me</label>
</div>
<div>
<a href="#" class="text-indigo-600 font-semibold">Forgot Password? </a>
</div>
</div>
<div class="text-red-800 font-bold " id="forgor"> <%= errMessage %></div>
<div class="mt-5">
<button type="submit"
class="border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-indigo-700 font-semibold">Login</button>
class="border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-indigo-700 font-semibold">Signup</button>
</div>
<div class="mt-5 block justify-between items-center">
<label>Already have an account?</label>
<a href="/login" class="text-indigo-600 font-semibold">Login</a>
</div>
</div>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</body>
</main>
</html>
<%- include("./partials/footer") %>
+9
View File
@@ -0,0 +1,9 @@
<%- include("./partials/fileHeader") %>
<%- include("./partials/header") %>
<main>
<!-- Your content here -->
</main>
<%- include("./partials/navBar") %>
<%- include("./partials/footer") %>