Rename project to MerchantsOfHope-SupplyANdDemandPortal
This commit is contained in:
20
README.md
20
README.md
@@ -1,4 +1,4 @@
|
|||||||
# MysteryApp-Cursor - Recruiter Workflow SAAS
|
# MerchantsOfHope-SupplyANdDemandPortal - Recruiter Workflow SAAS
|
||||||
|
|
||||||
A comprehensive SAAS application for managing recruiter workflows, built with modern technologies and following TDD principles.
|
A comprehensive SAAS application for managing recruiter workflows, built with modern technologies and following TDD principles.
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo
|
|||||||
1. **Clone the repository**
|
1. **Clone the repository**
|
||||||
```bash
|
```bash
|
||||||
git clone <repository-url>
|
git clone <repository-url>
|
||||||
cd MysteryApp-Cursor
|
cd MerchantsOfHope-SupplyANdDemandPortal
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Start the application**
|
2. **Start the application**
|
||||||
@@ -63,10 +63,10 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo
|
|||||||
3. **Initialize the database**
|
3. **Initialize the database**
|
||||||
```bash
|
```bash
|
||||||
# Run database migrations
|
# Run database migrations
|
||||||
docker-compose exec MysteryApp-Cursor-backend npm run migrate
|
docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run migrate
|
||||||
|
|
||||||
# Seed the database with sample data
|
# Seed the database with sample data
|
||||||
docker-compose exec MysteryApp-Cursor-backend npm run seed
|
docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run seed
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Access the application**
|
4. **Access the application**
|
||||||
@@ -78,8 +78,8 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo
|
|||||||
|
|
||||||
The application comes with pre-seeded demo accounts:
|
The application comes with pre-seeded demo accounts:
|
||||||
|
|
||||||
- **Admin**: admin@mysteryapp.com / admin123
|
- **Admin**: admin@merchantsofhope.org / admin123
|
||||||
- **Recruiter**: recruiter@mysteryapp.com / recruiter123
|
- **Recruiter**: recruiter@merchantsofhope.org / recruiter123
|
||||||
- **Employer**: employer@techcorp.com / employer123
|
- **Employer**: employer@techcorp.com / employer123
|
||||||
- **Candidate**: candidate@example.com / candidate123
|
- **Candidate**: candidate@example.com / candidate123
|
||||||
|
|
||||||
@@ -128,23 +128,23 @@ The application comes with pre-seeded demo accounts:
|
|||||||
### Backend Tests
|
### Backend Tests
|
||||||
```bash
|
```bash
|
||||||
# Run all tests
|
# Run all tests
|
||||||
docker-compose exec MysteryApp-Cursor-backend npm test
|
docker-compose exec merchantsofhope-supplyanddemandportal-backend npm test
|
||||||
|
|
||||||
# Run tests in watch mode
|
# Run tests in watch mode
|
||||||
docker-compose exec MysteryApp-Cursor-backend npm run test:watch
|
docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run test:watch
|
||||||
```
|
```
|
||||||
|
|
||||||
### Frontend Tests
|
### Frontend Tests
|
||||||
```bash
|
```bash
|
||||||
# Run frontend tests
|
# Run frontend tests
|
||||||
docker-compose exec MysteryApp-Cursor-frontend npm test
|
docker-compose exec merchantsofhope-supplyanddemandportal-frontend npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### Project Structure
|
### Project Structure
|
||||||
```
|
```
|
||||||
MysteryApp-Cursor/
|
MerchantsOfHope-SupplyANdDemandPortal/
|
||||||
├── backend/
|
├── backend/
|
||||||
│ ├── src/
|
│ ├── src/
|
||||||
│ │ ├── routes/ # API route handlers
|
│ │ ├── routes/ # API route handlers
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ Ignore anything that isn't core to the app (no CI/CD , no worrying about anythin
|
|||||||
|
|
||||||
Use docker and docker compose
|
Use docker and docker compose
|
||||||
|
|
||||||
Prefix all docker artifacts with MysteryApp-Cursor-
|
Prefix all docker artifacts with MerchantsOfHope-SupplyANdDemandPortal-
|
||||||
|
|
||||||
Lets go!
|
Lets go!
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "mysteryapp-cursor-backend",
|
"name": "merchantsofhope-supplyanddemandportal-backend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Backend for MysteryApp-Cursor recruiter workflow SAAS",
|
"description": "Backend for MerchantsOfHope-SupplyANdDemandPortal recruiter workflow SAAS",
|
||||||
"main": "src/server.js",
|
"main": "src/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node src/server.js",
|
"start": "node src/server.js",
|
||||||
@@ -31,6 +31,6 @@
|
|||||||
"@types/jest": "^29.5.8"
|
"@types/jest": "^29.5.8"
|
||||||
},
|
},
|
||||||
"keywords": ["recruiter", "saas", "workflow", "hiring"],
|
"keywords": ["recruiter", "saas", "workflow", "hiring"],
|
||||||
"author": "MysteryApp-Cursor",
|
"author": "MerchantsOfHope-SupplyANdDemandPortal",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const pool = new Pool({
|
|||||||
|
|
||||||
// Test database connection
|
// Test database connection
|
||||||
pool.on('connect', () => {
|
pool.on('connect', () => {
|
||||||
console.log('Connected to MysteryApp-Cursor database');
|
console.log('Connected to MerchantsOfHope-SupplyANdDemandPortal database');
|
||||||
});
|
});
|
||||||
|
|
||||||
pool.on('error', (err) => {
|
pool.on('error', (err) => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- MysteryApp-Cursor Database Schema
|
-- MerchantsOfHope-SupplyANdDemandPortal Database Schema
|
||||||
|
|
||||||
-- Users table (for authentication and user management)
|
-- Users table (for authentication and user management)
|
||||||
CREATE TABLE IF NOT EXISTS users (
|
CREATE TABLE IF NOT EXISTS users (
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ async function seed() {
|
|||||||
// Insert users
|
// Insert users
|
||||||
const users = [
|
const users = [
|
||||||
{
|
{
|
||||||
email: 'admin@mysteryapp.com',
|
email: 'admin@merchantsofhope.org',
|
||||||
password_hash: adminPassword,
|
password_hash: adminPassword,
|
||||||
first_name: 'Admin',
|
first_name: 'Admin',
|
||||||
last_name: 'User',
|
last_name: 'User',
|
||||||
role: 'admin'
|
role: 'admin'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
email: 'recruiter@mysteryapp.com',
|
email: 'recruiter@merchantsofhope.org',
|
||||||
password_hash: recruiterPassword,
|
password_hash: recruiterPassword,
|
||||||
first_name: 'John',
|
first_name: 'John',
|
||||||
last_name: 'Recruiter',
|
last_name: 'Recruiter',
|
||||||
@@ -108,8 +108,8 @@ async function seed() {
|
|||||||
|
|
||||||
console.log('Database seeding completed successfully!');
|
console.log('Database seeding completed successfully!');
|
||||||
console.log('Sample users created:');
|
console.log('Sample users created:');
|
||||||
console.log('- Admin: admin@mysteryapp.com / admin123');
|
console.log('- Admin: admin@merchantsofhope.org / admin123');
|
||||||
console.log('- Recruiter: recruiter@mysteryapp.com / recruiter123');
|
console.log('- Recruiter: recruiter@merchantsofhope.org / recruiter123');
|
||||||
console.log('- Employer: employer@techcorp.com / employer123');
|
console.log('- Employer: employer@techcorp.com / employer123');
|
||||||
console.log('- Candidate: candidate@example.com / candidate123');
|
console.log('- Candidate: candidate@example.com / candidate123');
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ app.use('*', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.listen(PORT, () => {
|
app.listen(PORT, () => {
|
||||||
console.log(`MysteryApp-Cursor backend server running on port ${PORT}`);
|
console.log(`MerchantsOfHope-SupplyANdDemandPortal backend server running on port ${PORT}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = app;
|
module.exports = app;
|
||||||
|
|||||||
@@ -1,58 +1,58 @@
|
|||||||
services:
|
services:
|
||||||
mysteryapp-cursor-database:
|
merchantsofhope-supplyanddemandportal-database:
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
container_name: mysteryapp-cursor-database
|
container_name: merchantsofhope-supplyanddemandportal-database
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: mysteryapp_cursor
|
POSTGRES_DB: merchantsofhope_supplyanddemandportal
|
||||||
POSTGRES_USER: mysteryapp_user
|
POSTGRES_USER: merchantsofhope_user
|
||||||
POSTGRES_PASSWORD: mysteryapp_password
|
POSTGRES_PASSWORD: merchantsofhope_password
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:5432:5432"
|
- "0.0.0.0:5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- mysteryapp-cursor-postgres-data:/var/lib/postgresql/data
|
- merchantsofhope-supplyanddemandportal-postgres-data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- mysteryapp-cursor-network
|
- merchantsofhope-supplyanddemandportal-network
|
||||||
|
|
||||||
mysteryapp-cursor-backend:
|
merchantsofhope-supplyanddemandportal-backend:
|
||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: mysteryapp-cursor-backend
|
container_name: merchantsofhope-supplyanddemandportal-backend
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
DATABASE_URL: postgresql://mysteryapp_user:mysteryapp_password@mysteryapp-cursor-database:5432/mysteryapp_cursor
|
DATABASE_URL: postgresql://merchantsofhope_user:merchantsofhope_password@merchantsofhope-supplyanddemandportal-database:5432/merchantsofhope_supplyanddemandportal
|
||||||
JWT_SECRET: mysteryapp_jwt_secret_key_2024
|
JWT_SECRET: merchantsofhope_jwt_secret_key_2024
|
||||||
PORT: 3001
|
PORT: 3001
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:3001:3001"
|
- "0.0.0.0:3001:3001"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysteryapp-cursor-database
|
- merchantsofhope-supplyanddemandportal-database
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend:/app
|
- ./backend:/app
|
||||||
- /app/node_modules
|
- /app/node_modules
|
||||||
networks:
|
networks:
|
||||||
- mysteryapp-cursor-network
|
- merchantsofhope-supplyanddemandportal-network
|
||||||
|
|
||||||
mysteryapp-cursor-frontend:
|
merchantsofhope-supplyanddemandportal-frontend:
|
||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: mysteryapp-cursor-frontend
|
container_name: merchantsofhope-supplyanddemandportal-frontend
|
||||||
environment:
|
environment:
|
||||||
REACT_APP_API_URL: http://localhost:3001
|
REACT_APP_API_URL: http://localhost:3001
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:12000:3000"
|
- "0.0.0.0:12000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysteryapp-cursor-backend
|
- merchantsofhope-supplyanddemandportal-backend
|
||||||
volumes:
|
volumes:
|
||||||
- ./frontend:/app
|
- ./frontend:/app
|
||||||
- /app/node_modules
|
- /app/node_modules
|
||||||
networks:
|
networks:
|
||||||
- mysteryapp-cursor-network
|
- merchantsofhope-supplyanddemandportal-network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysteryapp-cursor-postgres-data:
|
merchantsofhope-supplyanddemandportal-postgres-data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
mysteryapp-cursor-network:
|
merchantsofhope-supplyanddemandportal-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "mysteryapp-cursor-frontend",
|
"name": "merchantsofhope-supplyanddemandportal-frontend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Frontend for MysteryApp-Cursor recruiter workflow SAAS",
|
"description": "Frontend for MerchantsOfHope-SupplyANdDemandPortal recruiter workflow SAAS",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testing-library/jest-dom": "^5.17.0",
|
"@testing-library/jest-dom": "^5.17.0",
|
||||||
@@ -49,5 +49,5 @@
|
|||||||
"@types/react": "^18.2.42",
|
"@types/react": "^18.2.42",
|
||||||
"@types/react-dom": "^18.2.17"
|
"@types/react-dom": "^18.2.17"
|
||||||
},
|
},
|
||||||
"proxy": "http://MysteryApp-Cursor-backend:3001"
|
"proxy": "http://merchantsofhope-supplyanddemandportal-backend:3001"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
name="description"
|
||||||
content="MysteryApp-Cursor - Professional Recruiter Workflow SAAS"
|
content="MerchantsOfHope-SupplyANdDemandPortal - Professional Recruiter Workflow SAAS"
|
||||||
/>
|
/>
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
<title>MysteryApp-Cursor</title>
|
<title>MerchantsOfHope-SupplyANdDemandPortal</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const Layout = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex-1 h-0 pt-5 pb-4 overflow-y-auto">
|
<div className="flex-1 h-0 pt-5 pb-4 overflow-y-auto">
|
||||||
<div className="flex-shrink-0 flex items-center px-4">
|
<div className="flex-shrink-0 flex items-center px-4">
|
||||||
<h1 className="text-xl font-bold text-gray-900">MysteryApp-Cursor</h1>
|
<h1 className="text-xl font-bold text-gray-900">MerchantsOfHope-SupplyANdDemandPortal</h1>
|
||||||
</div>
|
</div>
|
||||||
<nav className="mt-5 px-2 space-y-1">
|
<nav className="mt-5 px-2 space-y-1">
|
||||||
{filteredNavigation.map((item) => {
|
{filteredNavigation.map((item) => {
|
||||||
@@ -83,7 +83,7 @@ const Layout = () => {
|
|||||||
<div className="flex-1 flex flex-col min-h-0 border-r border-gray-200 bg-white">
|
<div className="flex-1 flex flex-col min-h-0 border-r border-gray-200 bg-white">
|
||||||
<div className="flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
|
<div className="flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
|
||||||
<div className="flex items-center flex-shrink-0 px-4">
|
<div className="flex items-center flex-shrink-0 px-4">
|
||||||
<h1 className="text-xl font-bold text-gray-900">MysteryApp-Cursor</h1>
|
<h1 className="text-xl font-bold text-gray-900">MerchantsOfHope-SupplyANdDemandPortal</h1>
|
||||||
</div>
|
</div>
|
||||||
<nav className="mt-5 flex-1 px-2 space-y-1">
|
<nav className="mt-5 flex-1 px-2 space-y-1">
|
||||||
{filteredNavigation.map((item) => {
|
{filteredNavigation.map((item) => {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ describe('Layout', () => {
|
|||||||
it('renders the layout with user information', () => {
|
it('renders the layout with user information', () => {
|
||||||
renderWithRouter(<Layout />);
|
renderWithRouter(<Layout />);
|
||||||
|
|
||||||
expect(screen.getByText('MysteryApp-Cursor')).toBeInTheDocument();
|
expect(screen.getByText('MerchantsOfHope-SupplyANdDemandPortal')).toBeInTheDocument();
|
||||||
expect(screen.getByText('John Doe')).toBeInTheDocument();
|
expect(screen.getByText('John Doe')).toBeInTheDocument();
|
||||||
expect(screen.getByText('candidate')).toBeInTheDocument();
|
expect(screen.getByText('candidate')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ const Dashboard = () => {
|
|||||||
{getGreeting()}, {user?.firstName}!
|
{getGreeting()}, {user?.firstName}!
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 text-sm text-gray-500">
|
<p className="mt-1 text-sm text-gray-500">
|
||||||
Welcome to your MysteryApp-Cursor dashboard
|
Welcome to your MerchantsOfHope-SupplyANdDemandPortal dashboard
|
||||||
</p>
|
</p>
|
||||||
<div className="text-xs text-gray-500 mt-2">
|
<div className="text-xs text-gray-500 mt-2">
|
||||||
Debug: User role = {user?.role || 'undefined'}, User ID = {user?.id || 'undefined'}
|
Debug: User role = {user?.role || 'undefined'}, User ID = {user?.id || 'undefined'}
|
||||||
|
|||||||
@@ -121,8 +121,8 @@ const Login = () => {
|
|||||||
Demo accounts:
|
Demo accounts:
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-2 text-xs text-gray-500 space-y-1">
|
<div className="mt-2 text-xs text-gray-500 space-y-1">
|
||||||
<p>Admin: admin@mysteryapp.com / admin123</p>
|
<p>Admin: admin@merchantsofhope.org / admin123</p>
|
||||||
<p>Recruiter: recruiter@mysteryapp.com / recruiter123</p>
|
<p>Recruiter: recruiter@merchantsofhope.org / recruiter123</p>
|
||||||
<p>Employer: employer@techcorp.com / employer123</p>
|
<p>Employer: employer@techcorp.com / employer123</p>
|
||||||
<p>Candidate: candidate@example.com / candidate123</p>
|
<p>Candidate: candidate@example.com / candidate123</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user