Git Product home page Git Product logo

quizz's Introduction

MVC_MY_Quiz

My first project with Symfony !

  • Register (with email validation) and login
  • CRUD user (with email validation when you change the password or email)
  • Play quiz
  • See your quiz history (if user is not authenticated, he can plays a quiz and see history)

With the admin role :

  • CRUD question
  • CRUD response
  • CRUD category
  • CRUD user

My app

Versions

  • PHP 7.4.5
  • Symfony 5.0.*
  • Composer 1.10.5

In local

Start and quite the server

You need to have instal Symfony before use the following command in your terminal. To instal Symfony, refer you to the links at the end of this readme

symfony server:start
ctrl + c

Database

Start migration to have all the tables :

php bin/console doctrine:migrations:migrate 

Don't forget to update your username, password and table in .env

To deploy : in your Google Cloud Platform create your database and an user

How to configure your variable ?

DATABASE_URL = mysql://username:password@localhost?unix_socket=/cloudsql/project_id:region:your_database;dbname=database_name

Admin

I used easyAdmin a Symfony bundle. To install easyAdmin I followed the instructions of the documentation.

Link of the documentation

Mail

Dev env.

MailTrap

Create your inbox then update your config in .env

Prod env.

Sendgrid

Create the API Key then update your config in .env

PS : if you don't receive the email think to check your indesirable email

Docker and Google Cloud

Create a docker directory, docker-compose.yml file and .dockerignore. In your docker directory you have to create the following folders : Dockerfile and opcache.ini

Make your migration on cloud

Create a .cloudbuild directory and a seeder-deploy.yaml in this directory.

EXPORT PROJECT_ID=your_project_id
EXPORT DOCKER_IMAGE=your_docker_image
EXPORT YOUR_TAG=name_of_your_tag

docker build -f docker/Dockerfile -t eu.gcr.io/${PROJECT_ID}/${DOCKER_IMAGE}:${YOUR_TAG} .
docker push eu.gcr.io/${PROJECT_ID}/${DOCKER_IMAGE}:${YOUR_TAG}

Start your migration with cloud build

gcloud builds submit \
  --project ${PROJECT_ID} \
  --config .cloudbuild/seeder-deploy.yaml \
  --substitutions "_SERVICE=${DOCKER_IMAGE}:${YOUR_TAG},_REGION=europe-west1,_INSTANCE_NAME=my-sql-database,_DATABASE_URL=mysql://login_database:password_database@localhost?unix_socket=/cloudsql/${PROJECT_ID}:europe-west1:my-sql-database;dbname=db_name"

DNS and Google Analytics

If you want to use Google Analytics or somthing else create your property and configure it (Google A.) Then add the code at the end of the template : base.html.twig

To use a DNS add your DNS in your Cloud DNS and add a mapping to your service

Links

  • Link to download : Link
  • Link to install and configure Symfony : Link
  • Composer : Link

Preview

article article article article article article article article

quizz's People

Contributors

sekmset avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.