Skip to content

Latest commit

 

History

History
113 lines (84 loc) · 2.07 KB

File metadata and controls

113 lines (84 loc) · 2.07 KB

Full-Stack App Template

CI

A modern full-stack application template with a Haskell backend and Next.js frontend.

Project Structure

.
├── backend/          # Haskell server application
│   ├── app/         # Application entry point
│   ├── src/         # Source code
│   └── test/        # Test files
└── frontend/        # Next.js React application
    ├── app/         # Next.js app directory
    ├── components/  # React components
    ├── stores/      # State management
    └── public/      # Static assets

Prerequisites

Backend

Frontend

Setup

Backend Setup

cd backend
stack build

Frontend Setup

cd frontend
npm install
# or
yarn install

Running the Application

Start the Backend Server

cd backend
stack run

Start the Frontend Development Server

cd frontend
npm run dev
# or
yarn dev

The frontend will be available at http://localhost:3000.

Development

Backend Development

  • Main application code is in backend/src/Lib.hs
  • Entry point is in backend/app/Main.hs
  • Tests are in backend/test/

Frontend Development

  • Page routes are in frontend/app/
  • Reusable components are in frontend/components/
  • State management stores are in frontend/stores/

Testing

Backend Tests

cd backend
stack test

Frontend Tests

cd frontend
npm test

Building for Production

Backend

cd backend
stack build --copy-bins

Frontend

cd frontend
npm run build
npm start

License

See LICENSE file for details.