https://github.com/kathalysth/spider-react
A production-grade React implementation built from scratch with Fiber, hooks, and concurrent features
https://github.com/kathalysth/spider-react
fiber frontend hooks jsx library react typescript
Last synced: 2 months ago
JSON representation
A production-grade React implementation built from scratch with Fiber, hooks, and concurrent features
- Host: GitHub
- URL: https://github.com/kathalysth/spider-react
- Owner: Kathalysth
- License: mit
- Created: 2025-08-15T10:24:21.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-15T10:33:58.000Z (11 months ago)
- Last Synced: 2025-09-10T23:24:57.646Z (10 months ago)
- Topics: fiber, frontend, hooks, jsx, library, react, typescript
- Language: JavaScript
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ท๏ธ Spider React
A production-grade React implementation built from scratch with modern features including Fiber architecture, concurrent rendering, hooks, and server-side rendering capabilities.
[](https://github.com/kathalysth/spider-react/actions)
[](https://coveralls.io/github/kathalysth/spider-react?branch=main)
[](https://badge.fury.io/js/spider)
[](https://opensource.org/licenses/MIT)
## ๐ฏ Project Overview
Spider is a complete React library implementation following best practice coding standards. This project aims to provide:
- **Fiber Architecture**: Modern reconciliation with time-slicing
- **Concurrent Features**: useTransition, Suspense, and priority-based rendering
- **Complete Hooks System**: All React hooks with custom hooks support
- **Server-Side Rendering**: Streaming SSR with selective hydration
- **TypeScript First**: Fully typed with strict mode
- **Production Ready**: Comprehensive testing and performance optimization
## ๐ Features
### โ
Completed
- [x] Project setup and tooling configuration
- [ ] Core element and component system
- [ ] Basic reconciliation algorithm
- [ ] DOM renderer implementation
- [ ] Hooks system (useState, useEffect, etc.)
- [ ] Fiber architecture
- [ ] Concurrent rendering
- [ ] Suspense and error boundaries
- [ ] Server-side rendering
- [ ] Developer tools integration
### ๐ In Progress
- Setting up core types and interfaces
### ๐ Planned
- See our [detailed roadmap](./ROADMAP.md) for complete feature timeline
## ๐ฆ Packages
Spider is organized as a monorepo with two main packages:
- **`spider`**: Core React implementation
- **`spider-dom`**: DOM renderer for browser environments
## ๐ ๏ธ Installation
```bash
# Install both packages
npm install spider spider-dom
# Or with yarn
yarn add spider spider-dom
```
## ๐ Quick Start
```typescript
import { createElement, useState } from 'spider';
import { createRoot } from 'spider-dom';
function App() {
const [count, setCount] = useState(0);
return createElement('div', {}, [
createElement('h1', {}, 'Hello Spider!'),
createElement('p', {}, `Count: ${count}`),
createElement(
'button',
{
onClick: () => setCount(count + 1),
},
'Increment'
),
]);
}
const root = createRoot(document.getElementById('root')!);
root.render(createElement(App));
```
## ๐๏ธ Development
### Prerequisites
Node.js 18.0.0 or higher
npm 8.0.0 or higher
### Setup
```bash
# Clone the repository
git clone https://github.com/kathalysth/spider-react.git
cd spider-react
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Start development mode
npm run dev
```
### Project Structure
```bash
spider-react/
โโโ packages/
โ โโโ spider/ # Core React implementation
โ โโโ spider-dom/ # DOM renderer
โโโ examples/ # Example applications
โโโ docs/ # Documentation
โโโ tools/ # Build and development tools
```
## ๐งช Testing
We maintain >95% test coverage across all packages:
```bash
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
```
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTNG.md) for details.
## Development Process
1. Fork the repository
2. Create a feature branch (git checkout -b feature/amazing-feature)
3. Make your changes with tests
4. Ensure all tests pass (npm test)
5. Commit your changes (git commit -m 'Add amazing feature')
6. Push to the branch (git push origin feature/amazing-feature)
7. Open a Pull Request
## ๐ License
This project is licensed under the MIT [License](./LICENSE) - see the LICENSE file for details.
## ๐ Acknowledgments
- Inspired by React and its excellent architecture
- Built with modern tooling and best practices
- Thanks to the React team for the incredible work
## ๐ Project Status
This is an active development project. See our [roadmap](./ROADMAP.md) for current progress and upcoming features.
**Note**: This is an educational and experimental implementation. For production applications, please use the official React library.