Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 25 additions & 120 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,35 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Runtime data
pids
*.pid
*.seed
*.pid.lock
# dependencies
/node_modules
/.pnp
.pnp.js

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# testing
/coverage

# Coverage directory used by tools like istanbul
coverage
*.lcov
# next.js
/.next/
/out/

# nyc test coverage
.nyc_output
# production
/build

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# misc
.DS_Store
*.pem

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/
jspm_packages/
# local env files
.env*.local

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# vercel
.vercel

# TypeScript cache
# typescript
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
next-env.d.ts
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node

WORKDIR /app

COPY package.json package-lock.json ./

RUN npm ci

COPY . .

RUN npm run build

EXPOSE 8080

CMD ["npm", "start"]
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,53 @@
# Dev Test
## My Next.js Login App
This is a basic web application built with Next.js and React.

## Exercise
The project was bootstrapped with Create Next App.

Create a basic web application using next.js + React to display a login page. The login page should include fields for email and password. The page doesn't need to have actual functionality, but it should have the following feature:
## Local Development
To run the application locally, follow these steps:

- When the user enters a value that is not a valid email address in the email field, the box should have a red border and display a notification informing the user that the entered value is not a valid email.
- Make sure you have Node.js installed on your machine.

You have the freedom to choose any component library you prefer.
- Clone this repository to your local machine.

Additionally, please include a Dockerfile that enables us to run the next application easily by running the Docker container.
```bash
git clone https://github.com/annkornienko/dev-test-exercise.git
```

# Other notes
- Navigate to the project directory.

While we are not monitoring the time, the exercise should take you less than an hour to complete. Consider things like code quality, proper git usage (such a granular commits, meaningful commit messages etc.), ease of use etc.
- Install the dependencies using npm or yarn.

## How to submit
```bash
npm install
```

1. Fork this repository to a public one on your account.
2. Complete the exercise.
3. When you're done, submit your fork as a pull request back to this repository.
- Start the development server.

```bash
npm run dev
```

- Open your browser and visit http://localhost:3000 to access the application.

## Docker
To run the application using Docker, follow these steps:

- Make sure you have Docker installed on your machine.

- Clone this repository to your local machine (if you haven't already).

- Navigate to the project directory.

- Build the Docker image:

```bash
docker build -t next-app .
```

- Run the Docker container:

```bash
docker run -p 8080:3000 next-app
```
- Open your browser and visit http://localhost:8080 to access the application.
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
Loading