Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v14 or higher recommended)
- Yarn (v1.22.10)
- Git
Tech Stack
DS Visualizer is built with modern web technologies:- Framework: Next.js 12.3.4
- Language: TypeScript
- Styling: TailwindCSS
- Animations: Framer Motion
- Content: MDX (next-mdx-remote)
- Code Highlighting: Prism.js
- Formatter: Prettier
Installation
Follow these steps to set up your development environment:Fork and clone the repository
Fork the ds-visualizer repository to your GitHub account, then clone it:
Install dependencies
Install all project dependencies using Yarn:This will install all dependencies listed in
package.json, including:- Next.js and React
- TypeScript and type definitions
- TailwindCSS and PostCSS
- Framer Motion for animations
- MDX processing tools
Available Scripts
DS Visualizer provides the following npm scripts:Project Structure
Understanding the project structure will help you navigate the codebase:Content Directory
All educational content is stored incontent/[BlogName]/** directories:
- Each topic has its own directory
- Content is written in MDX format
- Supports code examples with syntax highlighting
- Can include interactive React components
Code Formatting
DS Visualizer uses Prettier for code formatting. Make sure to:- Format your code before committing
- Use consistent indentation and style
- Follow the existing code conventions in the project
Consider setting up Prettier integration in your editor for automatic formatting on save.
Troubleshooting
Port 3000 already in use
If port 3000 is already occupied, you can:Dependency conflicts
If you encounter dependency issues:TypeScript errors
Ensure you’re using a compatible TypeScript version (4.4.3 as specified inpackage.json).
Next Steps
Once your environment is set up:- Review the Contribution Guidelines
- Find an issue to work on or create a new one
- Make your changes and test thoroughly
- Submit a pull request