It is a hackathon starter made in Scala (Play Framework). The idea is to have a base project in which to start a hackathon or use it as a boilerplate to start new a project.
It covers the base structure of the project, users CRUD and API security scheme.
It aims to be an API application. In the case that the nature of the project is only Web-based, take a look to Web Hackathon Starter.
- Authentication using email and password
- Security scheme for logged or unlogged api services
- Email send through Sendgrid (dev mode logging emails in output log)
- Functional & integrational tests for auth and user flows
- Account management
- Edit profile
- Email verification
- Change password
- Delete user
Clone the repo and follow these steps to leave the app running:
Create a database with name hackathonStarter:
DROP DATABASE IF EXISTS hackathonStarter;
CREATE DATABASE hackathonStarter DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE hackathonStarter;
Create table structure and insert base data running conf/evolutions/default/1.sql
and conf/evolutions/default/2.sql
(only the !Ups sections in both files).
Open a console, and run sbt
command. Once the sbt is running execute run
.
When the startup has finished (first time it take a while to download all dependencies), you can call any api service on http://localhost:9000
endpoint.
To run the tests, once inside sbt
console execute test
.
By default the email sent is turn off (all emails will be print in the output log). To activate it follow the next steps:
- Create an account at Sendgrid
- Obtain an api key and change the default value at
conf/application.conf
inapp.sendgrid.apikey
param. You may want to change theapp.sendgrid.from
param too. - Turn on email send by changing to
true
theemail.enabled
param.
Thank you for considering contributing to Api Hackathon Starter.
The MIT License (MIT). Please see License File for more information.