A modern full-stack TypeScript framework built with React, Node.js, GraphQL, and PostgreSQL.
# Clone the repository
git clone https://github.com/yourusername/near.git
cd near
# Install dependencies
yarn install
# Set up environment variables
cp client/.env.example client/.env
cp server/.env.example server/.env
# Start development environment
docker-compose up
- React with TypeScript
- Apollo Client for GraphQL
- Tailwind CSS for styling
- React Router for navigation
- Jest & React Testing Library
- Node.js with TypeScript
- Express
- Apollo Server
- Prisma ORM
- PostgreSQL
- Redis for caching
- Jest for testing
near/
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── graphql/ # GraphQL queries and mutations
│ │ └── types/ # TypeScript type definitions
│ └── ...
├── server/ # Backend Node.js application
│ ├── src/
│ │ ├── resolvers/ # GraphQL resolvers
│ │ ├── schemas/ # GraphQL type definitions
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utility functions
│ └── ...
└── ...
- Node.js 18+
- Docker & Docker Compose
- Yarn
yarn start # Start both client and server
yarn test # Run all tests
yarn lint # Lint all files
yarn build # Build both client and server
yarn dev # Start development server
yarn build # Build for production
yarn test # Run tests
yarn lint # Lint code
yarn dev # Start development server
yarn build # Build for production
yarn test # Run tests
yarn lint # Lint code
yarn db:migrate # Run database migrations
yarn db:seed # Seed database
yarn db:studio # Open Prisma Studio
-
Create a new branch for your feature:
git checkout -b feature/your-feature-name
-
Make your changes and commit using conventional commits:
git commit -m "feat: add new feature" git commit -m "fix: resolve bug issue"
-
Push your changes and create a pull request:
git push origin feature/your-feature-name
REACT_APP_API_URL
: Backend API URLREACT_APP_GRAPHQL_URL
: GraphQL endpointREACT_APP_WS_URL
: WebSocket URL for subscriptions
DATABASE_URL
: PostgreSQL connection stringREDIS_URL
: Redis connection stringJWT_SECRET
: Secret for JWT tokensPORT
: Server port number
We use Jest for both frontend and backend testing:
# Run all tests
yarn test
# Run tests in watch mode
yarn test:watch
# Run tests with coverage
yarn test:coverage
The project includes GitHub Actions workflows for CI/CD:
-
ci.yml
: Runs on every pull request- Linting
- Type checking
- Unit tests
- Build verification
-
cd.yml
: Runs on main branch- Builds Docker images
- Pushes to ECR
- Deploys to ECS
We maintain code quality through:
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
- Husky for pre-commit hooks
- Jest for testing
- GitHub Actions for CI/CD
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.