An open API service indexing awesome lists of open source software.

https://github.com/imbios/improved-octo-fortnight

A monorepo technical test project using Turborepo, featuring a full-stack application with Express.js backend and Next.js frontend.
https://github.com/imbios/improved-octo-fortnight

appdir expressjs firebase hacktoberfest monorepo mui nextjs turborepo

Last synced: 2 months ago
JSON representation

A monorepo technical test project using Turborepo, featuring a full-stack application with Express.js backend and Next.js frontend.

Awesome Lists containing this project

README

          

# improved-octo-fortnight

A monorepo technical test project using Turborepo, featuring a full-stack application with Express.js backend and Next.js frontend.

## Project Structure

The project uses [Turborepo](https://turborepo.org) and contains:

```text
.github
└─ workflows
└─ CI with pnpm cache setup
.vscode
└─ Recommended extensions and settings for VSCode users
apps
├─ backend-repo
| ├─ Express.js
| ├─ Firebase Admin SDK
| ├─ Jest for testing
| └─ TypeScript
└─ frontend-repo
├─ Next.js
├─ React
├─ MUI Theme Customization
├─ Firebase Authentication
├─ Redux Store
└─ Jest for testing
packages
└─ types
└─ Shared TypeScript types for API responses and user models
```

## Key Features

### Backend (`apps/backend-repo`)

- Express.js server with TypeScript
- Firebase Admin SDK integration
- Authentication middleware
- User routes and controllers
- Integration and unit tests with Jest
- Clean architecture with separate controllers, routes, and repositories

### Frontend (`apps/frontend-repo`)

- Next.js application
- Material-UI with custom theme
- Firebase Authentication
- Redux store management
- Custom hooks for user session and data
- Component-based architecture (atoms/molecules)
- Unit tests with Jest and Snapshots
- Service worker for auth handling

### Shared Types (`packages/types`)

- Common TypeScript interfaces
- API response types
- User model definitions

### Shared Utils (`packages/utils`)

- Common utility functions
- Err

## Installation

### Prerequisites

- Node.js (version specified in `.node-version`)
- pnpm package manager

### Setup

1. Clone the repository:

```bash
git clone https://github.com/ImBIOS/improved-octo-fortnight.git
cd improved-octo-fortnight
```

2. Install dependencies:

```bash
pnpm install
```

3. Set up environment variables:

```bash
# For backend
cp apps/backend-repo/.env.example apps/backend-repo/.env
# For frontend
cp apps/frontend-repo/.env.example apps/frontend-repo/.env
```

4. Configure Firebase:
- Create a Firebase project
- Set up Firebase Admin SDK for backend
- Configure Firebase Authentication for frontend
- Update Firebase configuration in respective .env files

### Development

1. Start the backend server:

```bash
cd apps/backend-repo
pnpm dev
```

2. Start the frontend application:

```bash
cd apps/frontend-repo
pnpm dev
```

### Testing

The project includes comprehensive test suites for both backend and frontend:

```bash
# Run backend tests
cd apps/backend-repo
pnpm test

# Run frontend tests
cd apps/frontend-repo
pnpm test
```

## Deployment

### Backend Deployment

1. Build the backend:

```bash
cd apps/backend-repo
pnpm build
```

2. Deploy to your preferred hosting service (e.g., Google Cloud Run, Heroku)
3. Set up environment variables in your hosting platform

### Frontend Deployment

1. Build the frontend:

```bash
cd apps/frontend-repo
pnpm build
```

2. Deploy to your preferred hosting service (e.g., Vercel, Netlify)
3. Configure environment variables in your hosting platform

## Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.