Skip to main content

Prerequisites

Before installing CAFH Platform, ensure you have the following installed:

Node.js

Version 18.x or higher

npm

Version 9.x or higher (comes with Node.js)
Check your versions:
node --version
npm --version

Installation Steps

1

Clone the repository

git clone https://github.com/AXXIomaSPA/cafh.git
cd cafh
2

Install dependencies

The platform uses npm for package management. Install all required dependencies:
npm install
This will install:
  • React 19.2.3 - UI library
  • TypeScript 5.8.2 - Type safety
  • Express 5.2.1 - Backend server
  • Vite 6.2.0 - Build tool
  • React Router 7.10.1 - Routing
  • Lucide React 0.561.0 - Icons
  • Recharts 3.6.0 - Analytics charts
  • @xyflow/react 12.10.1 - Automation flow builder
  • Nodemailer 8.0.1 - Email sending
And many more dependencies listed in package.json.
3

Configure environment variables

Create a .env file in the project root:
cp .env.example .env
Edit the .env file with your SMTP configuration (optional for local development):
.env
# SMTP Configuration for cPanel
SMTP_HOST=mail.yourdomain.com
SMTP_PORT=465
SMTP_USER=[email protected]
SMTP_PASS=your_password
SMTP_SECURE=true

# Throttling Configuration
MAX_EMAILS_PER_HOUR=80
SMTP configuration is optional for local development. The platform will run without it, but email features won’t work.
4

Start the development server

npm run dev
The server will start on http://localhost:3000

Verify Installation

Once the server is running, open your browser to http://localhost:3000. You should see the CAFH Platform home page.

Admin Login

Email: [email protected]Password: admin123

Member Login

Email: [email protected]Password: miembro123

Project Structure

After installation, your project structure will look like this:
cafh/
├── components/          # React components
├── node_modules/        # Dependencies
├── App.tsx             # Main application component
├── index.tsx           # Entry point
├── types.ts            # TypeScript type definitions
├── storage.ts          # Data storage layer
├── constants.ts        # Configuration constants
├── server.ts           # Express backend server
├── package.json        # Project dependencies
├── tsconfig.json       # TypeScript configuration
├── vite.config.ts      # Vite build configuration
└── .env                # Environment variables (you create this)

Troubleshooting

If port 3000 is occupied, edit vite.config.ts to change the port:
vite.config.ts
server: {
  port: 3001,  // Change to any available port
  host: '0.0.0.0',
},
Try deleting node_modules and reinstalling:
rm -rf node_modules package-lock.json
npm install
Run the linter to check for type errors:
npm run lint
This runs tsc --noEmit to check types without building.

Next Steps

Environment Setup

Configure environment variables

Running Locally

Learn about development workflows

Tech Stack

Explore the technologies used

Architecture

Understand the platform architecture

Build docs developers (and LLMs) love