Welcome to the CUDenver AI Association Official Website. This repository contains the codebase for both the back-end (ExpressJS) and front-end (React) applications.
- Before Contributing
- Setup and Development
- Deployment
- Documentation
- Key Files
- Additional Resources
- Important Notes
- Contact Information
- Create Separate Branches: Always create a separate branch for your changes.
- No Direct Push to Main: Never push your changes directly to the main branch.
- Branch Naming: Use descriptive names (e.g.,
feature-login-page
,bugfix-api-endpoint
).
- Mandatory Pull Requests: All changes must go through a pull request.
- Review and Approval: Pull requests must be reviewed and approved by at least one other team member.
- Communication: Feel free to ask questions or seek clarification.
- Node.js / npm: Node.js version 22 or higher.
Use
nvm
for managing Node.js versions. - Git: For version control.
- Clone the Repository:
git clone [email protected]:cudenver-ai/OfficialCUDenverAI.git
cd OfficialCUDenverAI
- Run the Setup Script:
You can now set up both the back-end and front-end automatically using the provided setup.sh
script.
./setup.sh
For Mac User
chmod +x setup.sh
./setup.sh
This script will:
- Set up
nvm
and install Node.js version 22. - Install front-end and back-end dependencies.
- Running Express and React:
To start Express (API) in the back-end:
cd backend
node index.ts
To start the React frontend:
cd frontend
npm start
For detailed deployment instructions, refer to production-server.md
.
- Server Architecture: See
/docs/Server.md
for an overview. - Development Setup: See
/docs/development-server.md
for detailed instructions. - Production Deployment: See
/docs/production-server.md
for deployment steps.
src/App.tsx
: Main entry point for the React app.src/config.js
: Contains global variables likeAPI_BASE_URL
.package.json
: Frontend dependencies and scripts.tsconfig.json
: Type configuration.env
: Environment variables.
index.ts
: Main Flask application file.tsconfig.json
: Type configuration..env
: Environment variables.package.json
: backend dependencies and scripts.
-
Node.js and npm:
-
Frameworks and Libraries:
-
Deployment Tools:
-
Environment Variables:
- Keep sensitive information out of version control.
- Add
.env*
to your.gitignore
.
-
Switching Environments:
- Development:
- Use
FLASK_DEBUG=1
in.flaskenv
. - Run
npm start
for the frontend.
- Use
- Production:
- Set
FLASK_DEBUG=0
or remove it. - Build the frontend with
npm run build
. - Deploy using Docker.
- Set
- Development:
-
Code Formatting:
- Configure your editor to format on save for a better development experience.
-
Team Collaboration:
- Document changes and use comments within configuration files to guide team members.
- Ensure all team members run
npm install
at the root.
-
Testing:
- Always test both development and production setups after making changes.
By following this README and the accompanying documentation, you should be able to set up, develop, and deploy the application. Please let me know if you encounter any issues.