This project is a full-stack web application for the Robocus competition organized by the Robotics & IoT HCMUS Club.
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Backend: NestJS, TypeScript, GraphQL, TypeORM, PostgreSQL, JWT
- Deployment: Docker
- Testing: Jest
- Node.js and npm
- PostgreSQL (optional)
- Docker (optional)
-
Navigate to the frontend directory:
cd frontend -
Install the required dependencies:
npm install
-
Configure the environment variables for the frontend:
- Create a
.envfile and add the necessary variables
- Create a
-
Navigate to the backend directory:
cd backend -
Install the required dependencies:
npm install
-
Configure the environment variables for the backend:
- Create a
.envfile and add the necessary variables
- Create a
To run both frontend and backend locally, follow these steps:
-
In one terminal, run the frontend:
cd frontend npm run dev -
In another terminal, run the backend:
cd backend npm run dev
Now, the backend should run on http://localhost:8000 (or your specified port), and you should be able to access the frontend through http://localhost:3000.
frontend/
├── public/ # Static assets
├── src/ # Source code
│ ├── app/ # Main app directory with new routing system
│ ├── components/ # UI components
│ └── lib/ # Utility functions
├── .env # Frontend environment variables
├── next.config.ts # Next.js configuration file
├── package.json # Frontend dependencies
├── tailwind.config.ts # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
nestjs/
├── src/ # Source code
│ ├── graphql/ # GraphQL schemas
│ ├── modules/ # Modules for each entity
│ ├── app.module.ts # Root module of the application
│ └── main.ts # The entry file of the application
├── test/ # Test folder
├── .env # Environment variables
└── package.json # Dependencies
The backend exposes a GraphQL API that can be used by the frontend to interact with the server. Some common queries and mutations might include:
- Updata later
For more detailed API documentation, please refer to the backend's GraphQL schema or use tools like GraphQL Playground or Apollo Studio to explore available queries and mutations.
We welcome contributions to this project! Here’s how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Make your changes
- Commit your changes (
git commit -am 'Add feature') - Push to the branch (
git push origin feature-name) - Open a pull request
Please ensure that your code passes linting and testing before submitting a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.