Add remaining project files: config, public assets, context, and dependencies

This commit is contained in:
SridharRajamani 2025-11-05 18:03:39 +05:30
parent 67dcc2cd73
commit 4a1b4aeda6
16 changed files with 12786 additions and 0 deletions

15
.eslintrc.cjs Normal file
View File

@ -0,0 +1,15 @@
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': 'warn',
},
}

46
config.js Normal file
View File

@ -0,0 +1,46 @@
// CDN Configuration for React + Vite + JavaScript
// Auto detect localhost vs production - No environment variable needed!
const getCDNBase = () => {
// Vite environment variable check first (optional)
if (import.meta.env.VITE_CDN_URL) {
return import.meta.env.VITE_CDN_URL;
}
// Browser la automatic detection
if (typeof window !== "undefined") {
const hostname = window.location.hostname;
// Local development
if (hostname === "localhost" || hostname === "127.0.0.1") {
return "http://192.168.1.26/home/assets";
}
// Production - pozo.dev or pozo.app
if (hostname.includes("pozo.dev") || hostname.includes("pozo.app")) {
return "http://192.168.1.26/home/assets";
}
// Default - use current protocol and hostname
return `${window.location.protocol}//${hostname}/home/assets`;
}
// Fallback
return "http://192.168.1.26/home/assets";
};
// Export CDN base URL (ready to use!)
export const CDN_BASE = getCDNBase();
// Helper function to get full CDN URL
export const getCDNUrl = (filename) => {
// Remove leading slash if present
const cleanFilename = filename.startsWith("/") ? filename.slice(1) : filename;
return `${CDN_BASE}/${cleanFilename}`;
};
// Default export
export default {
CDN_BASE,
getCDNUrl,
};

28
context/AuthContext Normal file
View File

@ -0,0 +1,28 @@
// AuthContext.jsx
import { createContext, useContext, useEffect, useState } from "react";
const AuthCtx = createContext(null);
export const useAuth = () => useContext(AuthCtx);
export function AuthProvider({ children }) {
const [hasAuthorizedSession, setHasAuthorizedSession] = useState(false);
const [isAuthResolved, setIsAuthResolved] = useState(false);
useEffect(() => {
(async () => {
try {
// simulate or implement real check (localStorage/cookie/ping)
const token = localStorage.getItem("pozo_token");
setHasAuthorizedSession(!!token);
} finally {
setIsAuthResolved(true);
}
})();
}, []);
return (
<AuthCtx.Provider value={{ hasAuthorizedSession, isAuthResolved }}>
{children}
</AuthCtx.Provider>
);
}

12575
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

BIN
public/fav.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
public/favlogo 1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
public/og/Signin-og.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
public/og/blog-og.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

BIN
public/og/contact-og.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
public/og/default-og.jpg Normal file

Binary file not shown.

BIN
public/og/home.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 KiB

BIN
public/og/pricing-og.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

33
public/robots.txt Normal file
View File

@ -0,0 +1,33 @@
User-agent: *
# Allow top-level site content and important pages
Allow: /
Allow: /features
Allow: /pricing
Allow: /contact-us
Allow: /blog
# Allow common public asset folders
Allow: /assets/
Allow: /images/
Allow: /css/
Allow: /js/
# Disallow admin, build and development files
Disallow: /admin
Disallow: /AdminPanel
Disallow: /*.env
Disallow: /src/
Disallow: /dist/
Disallow: /node_modules/
# Sitemap location (replace if your production domain differs)
Sitemap: https://www.pozo.app/sitemap.xml
# Crawl delay (optional)
Crawl-delay: 1
# Notes:
# - This file is served from /public when using Vite. Ensure production deploy serves this file at https://your-domain/robots.txt
# - Robots rules are advisory; protect sensitive routes server-side as well.

1
public/vite.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

28
robots.txt Normal file
View File

@ -0,0 +1,28 @@
User-agent: *
# Allow important pages
Allow: /
Allow: /features
Allow: /pricing
Allow: /contact-us
Allow: /blog
# Allow assets
Allow: /assets/
Allow: /images/
Allow: /css/
Allow: /js/
# Disallow sensitive folders
Disallow: /admin
Disallow: /AdminPanel
Disallow: /*.env
Disallow: /src/
Disallow: /dist/
Disallow: /node_modules/
# Sitemap
Sitemap: https://www.pozo.app/sitemap.xml
# Crawl delay
Crawl-delay: 1

60
sitemap.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
<!-- Home -->
<url>
<loc>https://www.pozo.app/</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<!-- Core pages (adjust if your slugs differ) -->
<!-- <url>
<loc>https://www.pozo.app/features</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url> -->
<url>
<loc>https://www.pozo.app/pricing-pozoapp</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.pozo.app/contact-us</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>
<!-- Blog hub -->
<url>
<loc>https://www.pozo.app/blog</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
<!-- Sign In -->
<url>
<loc>https://www.pozo.app/signin</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
<!-- Example blog posts (replace with your real slugs weekly) -->
<!-- <url>
<loc>https://www.pozo.app/blog/pos-billing-for-retail</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.pozo.app/blog/restaurant-billing-with-pozoapp</loc>
<lastmod>2025-10-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url> -->
</urlset>