| title | description |
|---|---|
Development |
Set up your development environment for SchoolyAI |
Follow these steps to set up your local development environment for contributing to SchoolyAI:
git clone https://github.com/SchoolyAI/scorton-doc.git
cd scorton-docnpm installyarn installCreate a .env.local file in the root directory:
cp .env.example .env.localEdit the .env.local file with your configuration:
# API Configuration
NEXT_PUBLIC_API_URL=https://api.schoolyai.com/v1
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Authentication
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=http://localhost:3000
# Database (if using local development)
DATABASE_URL=your-database-url
# External Services
OPENAI_API_KEY=your-openai-key
STRIPE_SECRET_KEY=your-stripe-keynpm run devYour local development server will be available at http://localhost:3000.
By default, the development server uses port 3000. You can customize the port by using the --port flag:
npm run dev -- --port 3333scorton-doc/
├── docs/ # Documentation files
│ ├── api-reference/ # API documentation
│ ├── essentials/ # Core concepts
│ └── ...
├── src/ # Source code
│ ├── components/ # React components
│ ├── pages/ # Next.js pages
│ └── utils/ # Utility functions
├── public/ # Static assets
└── package.json # Dependencies and scripts
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run test # Run tests
npm run type-check # Run TypeScript type checkingyarn dev # Start development server
yarn build # Build for production
yarn start # Start production server
yarn lint # Run ESLint
yarn test # Run tests
yarn type-check # Run TypeScript type checkingWe use ESLint and Prettier for code quality. The project includes pre-commit hooks that automatically format your code:
npm run lint:fixThis project uses TypeScript for type safety. Run type checking:
npm run type-checkRun the test suite:
npm run testFor watch mode during development:
npm run test:watchTo preview documentation changes locally:
npm run docs:devThis will start the documentation server at http://localhost:3001.
Build the documentation for production:
npm run docs:buildDeploy to staging:
npm run deploy:stagingDeploy to production:
npm run deploy:production- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and commit them:
git commit -m 'Add your feature' - Push to the branch:
git push origin feature/your-feature-name - Submit a pull request
- Documentation: Check our comprehensive documentation
- Issues: Report bugs on GitHub Issues
- Discussions: Join our GitHub Discussions
- Support: Contact us at dev-support@schoolyai.com