A modern, full-stack website for Genrec AI built with React and Express.js in a unified project structure.
- Modern Design: Clean, professional interface with smooth animations
- Responsive Layout: Optimized for all device sizes
- Interactive Components: Engaging user interface elements
- Contact Forms: Multiple ways for users to get in touch
- Service Showcase: Detailed presentation of AI services
- Project Portfolio: Display of completed projects
- Admin Dashboard: Backend management interface
- Unified Structure: Single project with integrated frontend and backend
- Frontend: React 19, Tailwind CSS, Radix UI
- Backend: Node.js, Express.js
- Database: In-memory storage (configurable to PostgreSQL)
- Build Tool: Create React App
- Development: Concurrently for running both frontend and backend
- Node.js 16+
- npm
- Clone the repository:
git clone <repository-url>
cd genrec-website
- Install all dependencies:
npm install
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Start development:
# Start both frontend and backend in development mode
npm run dev
Or start them separately:
# Start only backend
npm run server:dev
# Start only frontend
npm run client:dev
- Build for production:
npm run build
- Start production server:
npm start
The application will be available at http://localhost:5000
in production, or http://localhost:3000
(frontend) and http://localhost:5000
(backend) in development.
genrec-website/
├── src/ # React frontend source
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── services/ # API service layer
│ ├── hooks/ # Custom React hooks
│ └── lib/ # Utility functions
├── public/ # Static assets
├── server/ # Express.js backend
│ ├── api/ # API route handlers
│ ├── config/ # Configuration files
│ ├── middleware/ # Express middleware
│ ├── models/ # Data models
│ ├── routes/ # Route definitions
│ ├── utils/ # Utility functions
│ ├── server.js # Main server file
│ └── index.js # Server entry point
├── build/ # Production build (generated)
├── package.json # Unified dependencies
└── README.md
npm start
- Start production server (serves built React app)npm run dev
- Start both frontend and backend in development modenpm run client:dev
- Start only React development servernpm run client:build
- Build React app for productionnpm run client:test
- Run React testsnpm run server:dev
- Start only backend with nodemonnpm run server:start
- Start only backend in production modenpm run build
- Build React app for production
Create a .env
file in the root directory:
# Server Configuration
NODE_ENV=development
PORT=5000
# Database Configuration (optional - currently using in-memory storage)
# DATABASE_URL=postgresql://username:password@localhost:5432/genrec_db
# Frontend URL (for CORS in production)
FRONTEND_URL=http://localhost:5000
# React App Environment Variables
REACT_APP_BACKEND_URL=http://localhost:5000
This unified structure makes deployment much simpler. You can deploy to any platform that supports Node.js:
- Create a Heroku app
- Set environment variables
- Deploy with
git push heroku main
- Connect your repository
- Set build command:
npm run build
- Set start command:
npm start
- Add environment variables
- Clone repository
- Run
npm install
- Run
npm run build
- Run
npm start
- Use PM2 or similar for process management
The project uses a proxy configuration to route API calls from the React development server to the Express backend. In production, the Express server serves the built React files directly.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.