Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 42 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Optional overrides for compose.yaml
CLIENT_PORT=8081
SERVER_PORT=5001
DB_PORT=5433
DB_NAME=apex_rentals

# Required for auth flows beyond local smoke tests.
JWT_SECRET=local-dev-jwt-secret
JWT_EXPIRES_IN=7d

# Postgres connection details.
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=postgres

Comment on lines +1 to +15
# Optional third-party integrations. Leave blank for local-only runs.
GEMINI_API_KEY=
EMAIL_HOST=
EMAIL_USER=
EMAIL_PASS=
MPESA_CONSUMER_KEY=
MPESA_CONSUMER_SECRET=
MPESA_SHORTCODE=
MPESA_PASSKEY=
MPESA_CALLBACK_URL=http://localhost:5001/api/payments/callback

# Optional super admin seed overrides.
SUPER_ADMIN_NAME=Apex Super Admin
SUPER_ADMIN_EMAIL=admin@apex.local
SUPER_ADMIN_PASSWORD=Admin123!

# Optional starter landlord and tenant seed overrides.
TENANT_NAME=Kamau Tenant
TENANT_EMAIL=kamau1@gmail.com
LANDLORD_NAME=Kamau Landlord
LANDLORD_EMAIL=kamau3@gmail.com
USER_PASSWORD=123456789
STARTER_PROPERTY_NAME=Kamau Heights
STARTER_PROPERTY_ADDRESS=Lumumba Drive, Nairobi
STARTER_OCCUPIED_UNIT=A1
STARTER_VACANT_UNIT=A2
STARTER_RENT_AMOUNT=25000
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Optional overrides for compose.yaml
CLIENT_PORT=8081
SERVER_PORT=5000
MONGO_PORT=27017
MONGO_DB=apex_rentals
DB_PORT=5432
DB_NAME=apex_rentals

# Required for auth flows beyond local smoke tests.
JWT_SECRET=local-dev-jwt-secret
JWT_EXPIRES_IN=7d

# Postgres connection details.
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=

# Optional third-party integrations. Leave blank for local-only runs.
GEMINI_API_KEY=
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ server/node_modules
server/.env

client/node_modules
client/vite.config.js
1 change: 0 additions & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
dist
vite.config.js
13 changes: 13 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="manifest" href="/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#6366f1" />
<title>Apex Agencies - Real Estate Management</title>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('SW registered: ', registration);
}).catch(registrationError => {
console.log('SW registration failed: ', registrationError);
});
});
}
</script>
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 2 additions & 2 deletions client/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server {
index index.html;

location /api/ {
proxy_pass http://server:5000;
proxy_pass http://host.docker.internal:5000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -15,7 +15,7 @@ server {
}

location /uploads/ {
proxy_pass http://server:5000;
proxy_pass http://host.docker.internal:5000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
11 changes: 11 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"react-dom": "^18.3.1",
"react-router-dom": "^6.30.3",
"socket.io-client": "^4.7.5",
"sonner": "^2.0.7",
"sweetalert2": "^11.26.24"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions client/public/icons/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions client/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Apex Rentals Management",
"short_name": "Apex",
"description": "Multi-tenant Rentals Management Solution",
"start_url": "/",
"display": "standalone",
"background_color": "#0f172a",
"theme_color": "#6366f1",
"icons": [
{
"src": "/icons/icon.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "any maskable"
}
]
}
19 changes: 19 additions & 0 deletions client/public/sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const CACHE_NAME = 'apex-cache-v1';
const urlsToCache = [
'/',
'/index.html',
];

self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => cache.addAll(urlsToCache))
);
});

self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request)
.then((response) => response || fetch(event.request))
);
});
Loading
Loading