diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..747367c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +/out +/node_modules +/.git +/.next diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e917696 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:12-alpine + +WORKDIR /usr/src/app + +COPY . ./ + +CMD [ "yarn", "start" ] diff --git a/README.md b/README.md index 3aff5a1..944d7b2 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,6 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app). +# OhMyForm UI -## Getting Started +[![Financial Contributors on Open Collective](https://opencollective.com/ohmyform-sustainability/all/badge.svg?label=financial+contributors)](https://opencollective.com/ohmyform-sustainability) ![Project Status] -First, run the development server: - -```bash -npm run dev -# or -yarn dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/zeit/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +[![Discord](https://img.shields.io/discord/595773457862492190.svg?label=Discord%20Chat)](https://discord.gg/MJqAuAZ) +> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires. diff --git a/doc/development.md b/doc/development.md new file mode 100644 index 0000000..1890c5a --- /dev/null +++ b/doc/development.md @@ -0,0 +1,46 @@ +# Development + +tip's and tricks to get you started + +## First Run + +install yarn on your system if not already present and then install all dependencies +by running `yarn install` + +## Development Run + +to run with hot code reloading call `yarn start:dev` + +## Production Run + +there are 2 options for a production build, one with SSR enabled and one for static exports. + +### Static Export + +To create a static export call `yarn export`, this will create the folder `/out` that can +be copied to any static hosting site. + +### SSR + +first build the current codebase by `yarn build` and then execute `yarn start`, any request +coming into the system will then be rendered on the server. (great for SEO) + +## Configuration Options + +### GraphQL Path + +Per default the graphql endpoint is expected at `/graphql` on the same host as the frontend. +To modify this pass the environment variable API_HOST with the parameter you need. + +With a local backend you could start ie the dev server with +`API_HOST=http://localhost:4100/graphql yarn start:dev` + + +## Used Tools / Libraries + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Ant Design](https://ant.design/components) - UI Framework used +- [SwiperJS](https://swiperjs.com/) - Form Slides +- [Apollo Client](https://www.apollographql.com/docs/react/) - GraphQL Client +- [Styled Components](https://styled-components.com/) - Component Styling +