|
1 | | -# Base44 App |
| 1 | +# CCAI Collections App |
2 | 2 |
|
| 3 | +A Vite+React app for collections management with Supabase backend. |
3 | 4 |
|
4 | | -This app was created automatically by Base44. |
5 | | -It's a Vite+React app that communicates with the Base44 API. |
| 5 | +## Prerequisites |
6 | 6 |
|
7 | | -## Running the app |
| 7 | +- Node.js (v18 or higher) |
| 8 | +- npm or yarn |
| 9 | +- Supabase account |
| 10 | +- AWS account (for deployment) |
| 11 | + |
| 12 | +## Environment Setup |
| 13 | + |
| 14 | +1. Create a `.env.local` file in the root directory: |
| 15 | +```bash |
| 16 | +VITE_SUPABASE_URL=your-supabase-project-url |
| 17 | +VITE_SUPABASE_ANON_KEY=your-supabase-anon-key |
| 18 | +``` |
| 19 | + |
| 20 | +2. Get your Supabase credentials: |
| 21 | + - Go to [Supabase Dashboard](https://app.supabase.com) |
| 22 | + - Create a new project or select existing |
| 23 | + - Go to Settings → API |
| 24 | + - Copy the Project URL and anon/public key |
| 25 | + |
| 26 | +## Installation |
8 | 27 |
|
9 | 28 | ```bash |
10 | 29 | npm install |
| 30 | +``` |
| 31 | + |
| 32 | +## Running the app |
| 33 | + |
| 34 | +```bash |
| 35 | +# Development mode |
11 | 36 | npm run dev |
| 37 | + |
| 38 | +# Production build |
| 39 | +npm run build |
| 40 | + |
| 41 | +# Preview production build |
| 42 | +npm run preview |
12 | 43 | ``` |
13 | 44 |
|
14 | | -## Building the app |
| 45 | +## Database Setup |
| 46 | + |
| 47 | +The app requires these Supabase tables: |
| 48 | +- `portfolios` - Portfolio management |
| 49 | +- `debts` - Debt records |
| 50 | +- `debtors` - Debtor information |
| 51 | +- `payments` - Payment tracking |
| 52 | +- `vendors` - Vendor management |
| 53 | +- `integrations` - Third-party integrations |
| 54 | +- `campaigns` - Communication campaigns |
| 55 | + |
| 56 | +Run the migrations in the `supabase/migrations/` folder. |
15 | 57 |
|
| 58 | +## Deployment |
| 59 | + |
| 60 | +### AWS S3 + CloudFront (Recommended) |
| 61 | + |
| 62 | +1. Build the app: |
16 | 63 | ```bash |
17 | 64 | npm run build |
18 | 65 | ``` |
19 | 66 |
|
20 | | -For more information and support, please contact Base44 support at [email protected]. |
| 67 | +2. Deploy to S3: |
| 68 | +```bash |
| 69 | +# Create S3 bucket |
| 70 | +aws s3 mb s3://your-bucket-name |
| 71 | + |
| 72 | +# Upload files |
| 73 | +aws s3 sync dist/ s3://your-bucket-name --delete |
| 74 | + |
| 75 | +# Enable static website hosting |
| 76 | +aws s3 website s3://your-bucket-name --index-document index.html --error-document index.html |
| 77 | + |
| 78 | +# Make public |
| 79 | +aws s3api put-public-access-block --bucket your-bucket-name --public-access-block-configuration "BlockPublicAcls=false,IgnorePublicAcls=false,BlockPublicPolicy=false,RestrictPublicBuckets=false" |
| 80 | + |
| 81 | +aws s3api put-bucket-policy --bucket your-bucket-name --policy '{ |
| 82 | + "Version": "2012-10-17", |
| 83 | + "Statement": [{ |
| 84 | + "Effect": "Allow", |
| 85 | + "Principal": "*", |
| 86 | + "Action": "s3:GetObject", |
| 87 | + "Resource": "arn:aws:s3:::your-bucket-name/*" |
| 88 | + }] |
| 89 | +}' |
| 90 | +``` |
| 91 | + |
| 92 | +3. (Optional) Add CloudFront for HTTPS: |
| 93 | + - Go to AWS CloudFront Console |
| 94 | + - Create distribution pointing to your S3 website URL |
| 95 | + - Enable "Redirect HTTP to HTTPS" |
| 96 | + |
| 97 | +### Alternative: AWS Amplify Console |
| 98 | + |
| 99 | +1. Push code to GitHub |
| 100 | +2. Go to AWS Amplify Console |
| 101 | +3. Connect GitHub repository |
| 102 | +4. Add environment variables (VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY) |
| 103 | +5. Deploy automatically |
| 104 | + |
| 105 | +## Features |
| 106 | + |
| 107 | +- Portfolio management |
| 108 | +- Debt tracking and collection |
| 109 | +- Debtor management |
| 110 | +- Payment processing |
| 111 | +- Vendor management |
| 112 | +- Communication campaigns |
| 113 | +- Legal case tracking |
| 114 | +- Reporting and analytics |
| 115 | +- Third-party integrations |
| 116 | + |
| 117 | +## Tech Stack |
| 118 | + |
| 119 | +- **Frontend**: React 18, Vite, TailwindCSS |
| 120 | +- **Backend**: Supabase (PostgreSQL, Auth, Storage) |
| 121 | +- **Deployment**: AWS S3 + CloudFront |
| 122 | +- **Styling**: TailwindCSS + shadcn/ui components |
| 123 | + |
| 124 | +For more information and support, please contact support. |
0 commit comments