Prerequisites
Before you begin, ensure you have the following installed on your system:- Node.js (version 20 or higher)
- npm or yarn package manager
- Git for version control
Getting Started
Clone the Repository
Fork and clone the Open Tarteel repository to your local machine:
Replace
your-username with your GitHub username if you forked the repository.Install Dependencies
Install all required dependencies using your preferred package manager:This will install all dependencies listed in
package.json, including:- Next.js - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Jotai - State management
- React Intl - Internationalization
Environment Configuration
Create a
.env.local file in the root directory for environment variables:The
.env.example file contains all the necessary environment variable templates.Verify Installation
Run the development server to verify everything is set up correctly:Open http://localhost:3000 in your browser to see the application running.
Development Tools
TypeScript Configuration
The project uses TypeScript with strict mode enabled. Key configurations intsconfig.json:
- Target: ES2017
- Strict mode: Enabled
- Path aliases: Configured for cleaner imports
Code Quality Tools
The project includes several tools to maintain code quality:- ESLint - Code linting with Next.js and TypeScript rules
- Prettier - Code formatting
- Husky - Git hooks for pre-commit checks
- lint-staged - Run linters on staged files
- Commitlint - Enforce conventional commit messages
Editor Setup
We recommend using VS Code with the following extensions:
- ESLint
- Prettier
- Tailwind CSS IntelliSense
- TypeScript Vue Plugin (Volar)
.vscode/ for optimal development experience.
Common Issues
Port Already in Use
If port 3000 is already in use, you can specify a different port:Type Errors
Run the type checker to identify TypeScript issues:Next Steps
Now that your environment is set up, you can:- Learn about building and running the project
- Explore the codebase structure
- Read the contribution guidelines